From e7629434fb2ebf7f3f28422f8954dba5f16fe710 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Wed, 1 Jul 2009 15:18:53 +0200 Subject: [PATCH] fix bad decoding of particular jpeg images. --- linphone/mediastreamer2/src/nowebcam.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linphone/mediastreamer2/src/nowebcam.c b/linphone/mediastreamer2/src/nowebcam.c index f76a00bd0..ab663e680 100644 --- a/linphone/mediastreamer2/src/nowebcam.c +++ b/linphone/mediastreamer2/src/nowebcam.c @@ -65,7 +65,7 @@ static mblk_t *jpeg2yuv(uint8_t *jpgbuf, int bufsize, MSVideoSize *reqsize){ ret->b_wptr=ret->b_datap->db_lim; avpicture_fill(&dest,ret->b_rptr,PIX_FMT_YUV420P,reqsize->width,reqsize->height); - sws_ctx=sws_getContext(av_context.width,av_context.height,PIX_FMT_YUV420P, + sws_ctx=sws_getContext(av_context.width,av_context.height,av_context.pix_fmt, reqsize->width,reqsize->height,PIX_FMT_YUV420P,SWS_FAST_BILINEAR, NULL, NULL, NULL); if (sws_scale(sws_ctx,orig.data,orig.linesize,0,av_context.height,dest.data,dest.linesize)<0){