summaryrefslogtreecommitdiff
path: root/libswscale/utils.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2010-10-29 13:48:12 +0000
committerMartin Storsjö <martin@martin.st>2010-10-29 13:48:12 +0000
commit9c158e49471b7b0d8be979286ea6505677d88556 (patch)
tree54e063d806e8a149a5e46aa19118f674bf681f89 /libswscale/utils.c
parent0526c6f7c7852730e4d3da3dd1d070deb00e5043 (diff)
Store src/dstFormat after calling handle_jpeg
handle_jpeg may update the src/dstFormat variables, this makes sure the updated version is stored in the context. This fixes roundup issue 2302. Patch by Troot, all_crap_goes_here at hotmail Originally committed as revision 32562 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
Diffstat (limited to 'libswscale/utils.c')
-rw-r--r--libswscale/utils.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libswscale/utils.c b/libswscale/utils.c
index 6365522cbc..166e983477 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -1554,15 +1554,15 @@ struct SwsContext *sws_getCachedContext(struct SwsContext *context,
return NULL;
context->srcW = srcW;
context->srcH = srcH;
+ context->srcRange = handle_jpeg(&srcFormat);
context->srcFormat = srcFormat;
context->dstW = dstW;
context->dstH = dstH;
+ context->dstRange = handle_jpeg(&dstFormat);
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);