aboutsummaryrefslogtreecommitdiffstats
path: root/libswscale
diff options
context:
space:
mode:
authorKO Myung-Hun <komh@chollian.net>2008-01-17 08:06:09 +0000
committerBenoit Fouet <benoit.fouet@free.fr>2008-01-17 08:06:09 +0000
commit337a2a4530109c40b5c9a3b3d04d9b45f35e7c89 (patch)
treed5a1d87ad5fc141258898e0e2a789ce658200946 /libswscale
parent76d7c327eba042106b729e9d671b6f85f515b1af (diff)
downloadffmpeg-337a2a4530109c40b5c9a3b3d04d9b45f35e7c89.tar.gz
Check param in sws_getCachedContext().
Patch by KO Myung-Hun komh chollian net Original thread: [FFmpeg-devel] [PATCH] param check in sws_getCachedContext() Date: Wed Jan 9 11:15:19 CET 2008 Originally committed as revision 25775 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
Diffstat (limited to 'libswscale')
-rw-r--r--libswscale/swscale.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libswscale/swscale.c b/libswscale/swscale.c
index a68d2b881b..05e1def3c8 100644
--- a/libswscale/swscale.c
+++ b/libswscale/swscale.c
@@ -2959,12 +2959,17 @@ struct SwsContext *sws_getCachedContext(struct SwsContext *context,
int dstW, int dstH, int dstFormat, int flags,
SwsFilter *srcFilter, SwsFilter *dstFilter, double *param)
{
+ static const double default_param[2] = {SWS_PARAM_DEFAULT, SWS_PARAM_DEFAULT};
+
+ if (!param)
+ param = default_param;
+
if (context != NULL) {
if ((context->srcW != srcW) || (context->srcH != srcH) ||
(context->srcFormat != srcFormat) ||
(context->dstW != dstW) || (context->dstH != dstH) ||
(context->dstFormat != dstFormat) || (context->flags != flags) ||
- (context->param != param))
+ (context->param[0] != param[0]) || (context->param[1] != param[1]))
{
sws_freeContext(context);
context = NULL;