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

Fix autotools and compiler warning

parent 70bea4ed
...@@ -270,7 +270,7 @@ libmediastreamer_voip_la_SOURCES+= videofilters/videoenc.c \ ...@@ -270,7 +270,7 @@ libmediastreamer_voip_la_SOURCES+= videofilters/videoenc.c \
utils/ffmpeg-priv.h \ utils/ffmpeg-priv.h \
utils/ffmpeg-priv.c \ utils/ffmpeg-priv.c \
videofilters/h264dec.c \ videofilters/h264dec.c \
videofilters/jpegwriter.c videofilters/ffmpegjpegwriter.c
endif endif
if BUILD_SDL if BUILD_SDL
...@@ -296,7 +296,7 @@ libmediastreamer_voip_la_SOURCES+= voip/rfc2429.h \ ...@@ -296,7 +296,7 @@ libmediastreamer_voip_la_SOURCES+= voip/rfc2429.h \
voip/vp8rtpfmt.c \ voip/vp8rtpfmt.c \
voip/vp8rtpfmt.h \ voip/vp8rtpfmt.h \
videofilters/mire.c \ videofilters/mire.c \
videofilters/nowebcam.c voip/nowebcam.h \ videofilters/ffmpegnowebcam.c voip/nowebcam.h \
videofilters/extdisplay.c \ videofilters/extdisplay.c \
utils/bits_rw.c \ utils/bits_rw.c \
utils/x11_helper.c \ utils/x11_helper.c \
......
...@@ -41,8 +41,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ...@@ -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) { mblk_t *jpeg2yuv(uint8_t *jpgbuf, int bufsize, MSVideoSize *reqsize) {
MSPicture dest; MSPicture dest;
mblk_t *m = NULL; mblk_t *m = NULL;
int imgsrch, imgsrcw, imgsrcsubsamp, imgsrccolor; int imgsrch, imgsrcw, imgsrcsubsamp, imgsrccolor, sfnum, i;
int scaledw, scaledh, sfnum; int scaledw = 0, scaledh = 0;
tjscalingfactor* sf = NULL; tjscalingfactor* sf = NULL;
tjhandle turbojpegDec = tjInitDecompress(); tjhandle turbojpegDec = tjInitDecompress();
...@@ -66,13 +66,18 @@ mblk_t *jpeg2yuv(uint8_t *jpgbuf, int bufsize, MSVideoSize *reqsize) { ...@@ -66,13 +66,18 @@ mblk_t *jpeg2yuv(uint8_t *jpgbuf, int bufsize, MSVideoSize *reqsize) {
sf = tjGetScalingFactors(&sfnum); sf = tjGetScalingFactors(&sfnum);
// Prevision of height and width // Prevision of height and width
for(int i = 0; i < sfnum; i++) { for(i = 0; i < sfnum; i++) {
scaledw = TJSCALED(imgsrcw, sf[i]); scaledw = TJSCALED(imgsrcw, sf[i]);
scaledh = TJSCALED(imgsrch, sf[i]); scaledh = TJSCALED(imgsrch, sf[i]);
if (scaledw <= reqsize->width && scaledh <= reqsize->height) if (scaledw <= reqsize->width && scaledh <= reqsize->height)
break; 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); m = ms_yuv_buf_alloc(&dest, scaledw, scaledh);
if (m == NULL) goto clean; 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