Commit e7629434 authored by Simon Morlat's avatar Simon Morlat
Browse files

fix bad decoding of particular jpeg images.

parent b0880792
......@@ -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){
......
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