Commit 538ee142 authored by Erwan Croze's avatar Erwan Croze 👋🏻

Fix autotools and compiler warning

parent 70bea4ed
......@@ -270,7 +270,7 @@ libmediastreamer_voip_la_SOURCES+= videofilters/videoenc.c \
utils/ffmpeg-priv.h \
utils/ffmpeg-priv.c \
videofilters/h264dec.c \
videofilters/jpegwriter.c
videofilters/ffmpegjpegwriter.c
endif
if BUILD_SDL
......@@ -296,7 +296,7 @@ libmediastreamer_voip_la_SOURCES+= voip/rfc2429.h \
voip/vp8rtpfmt.c \
voip/vp8rtpfmt.h \
videofilters/mire.c \
videofilters/nowebcam.c voip/nowebcam.h \
videofilters/ffmpegnowebcam.c voip/nowebcam.h \
videofilters/extdisplay.c \
utils/bits_rw.c \
utils/x11_helper.c \
......
......@@ -41,8 +41,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
mblk_t *jpeg2yuv(uint8_t *jpgbuf, int bufsize, MSVideoSize *reqsize) {
MSPicture dest;
mblk_t *m = NULL;
int imgsrch, imgsrcw, imgsrcsubsamp, imgsrccolor;
int scaledw, scaledh, sfnum;
int imgsrch, imgsrcw, imgsrcsubsamp, imgsrccolor, sfnum, i;
int scaledw = 0, scaledh = 0;
tjscalingfactor* sf = NULL;
tjhandle turbojpegDec = tjInitDecompress();
......@@ -66,13 +66,18 @@ mblk_t *jpeg2yuv(uint8_t *jpgbuf, int bufsize, MSVideoSize *reqsize) {
sf = tjGetScalingFactors(&sfnum);
// Prevision of height and width
for(int i = 0; i < sfnum; i++) {
for(i = 0; i < sfnum; i++) {
scaledw = TJSCALED(imgsrcw, sf[i]);
scaledh = TJSCALED(imgsrch, sf[i]);
if (scaledw <= reqsize->width && scaledh <= reqsize->height)
break;
}
if (scaledw <= 0 && scaledh <= 0) {
ms_error("No resolution size found for (%ix%i)", reqsize->width, reqsize->height);
goto clean;
}
m = ms_yuv_buf_alloc(&dest, scaledw, scaledh);
if (m == NULL) goto clean;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment