diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2010-10-03 07:53:40 +0000 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2010-10-03 07:53:40 +0000 |
commit | 12eef0d1ba55dd0eb36893a0d6e0fa7e04dda122 (patch) | |
tree | e054bdc5eaa10791a4a588694179e97b0b240b64 /libswscale/utils.c | |
parent | 62784e3733ceb0f58007db8bb2e41e1abf62b85e (diff) | |
download | ffmpeg-streaming-12eef0d1ba55dd0eb36893a0d6e0fa7e04dda122.zip ffmpeg-streaming-12eef0d1ba55dd0eb36893a0d6e0fa7e04dda122.tar.gz |
100l, fix sws_getCachedContext. It did not set the colorspace details,
but worse it did not set up destination dimensions, thus every user
of it would necessarily fail.
Originally committed as revision 32424 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
Diffstat (limited to 'libswscale/utils.c')
-rw-r--r-- | libswscale/utils.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libswscale/utils.c b/libswscale/utils.c index 83883b7..6365522 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -1555,10 +1555,15 @@ struct SwsContext *sws_getCachedContext(struct SwsContext *context, context->srcW = srcW; context->srcH = srcH; context->srcFormat = srcFormat; + context->dstW = dstW; + context->dstH = dstH; context->dstFormat = dstFormat; context->flags = flags; context->param[0] = param[0]; context->param[1] = param[1]; + context->srcRange = handle_jpeg(&srcFormat); + context->dstRange = handle_jpeg(&dstFormat); + sws_setColorspaceDetails(context, ff_yuv2rgb_coeffs[SWS_CS_DEFAULT], context->srcRange, ff_yuv2rgb_coeffs[SWS_CS_DEFAULT] /* FIXME*/, context->dstRange, 0, 1<<16, 1<<16); if (sws_init_context(context, srcFilter, dstFilter) < 0) { sws_freeContext(context); return NULL; |