65
65
ret->b_wptr=ret->b_datap->db_lim;
66
66
avpicture_fill(&dest,ret->b_rptr,PIX_FMT_YUV420P,reqsize->width,reqsize->height);
68
sws_ctx=sws_getContext(av_context.width,av_context.height,PIX_FMT_YUV420P,
68
sws_ctx=sws_getContext(av_context.width,av_context.height,av_context.pix_fmt,
69
69
reqsize->width,reqsize->height,PIX_FMT_YUV420P,SWS_FAST_BILINEAR,
71
77
if (sws_scale(sws_ctx,orig.data,orig.linesize,0,av_context.height,dest.data,dest.linesize)<0){
72
78
ms_error("jpeg2yuv: sws_scale() failed.");
74
84
sws_freeContext(sws_ctx);
75
85
avcodec_close(&av_context);