From 69645c021ad2cc503769b44b9008f98b014423de Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Thu, 26 May 2011 09:15:38 -0400 Subject: swscale: replace formatConvBuffer[VOF] by allocated array. This allows to convert between formats of arbitrary width, regardless of the value of VOF/VOFW. --- libswscale/utils.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'libswscale/utils.c') diff --git a/libswscale/utils.c b/libswscale/utils.c index 96b3207cdd..20f07d672e 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -790,10 +790,7 @@ int sws_init_context(SwsContext *c, SwsFilter *srcFilter, SwsFilter *dstFilter) srcW, srcH, dstW, dstH); return AVERROR(EINVAL); } - if(srcW > VOFW || dstW > VOFW) { - av_log(NULL, AV_LOG_ERROR, "swScaler: Compile-time maximum width is "AV_STRINGIFY(VOFW)" change VOF/VOFW and recompile\n"); - return AVERROR(EINVAL); - } + FF_ALLOC_OR_GOTO(c, c->formatConvBuffer, FFALIGN(srcW, 16) * 2, fail); if (!dstFilter) dstFilter= &dummyFilter; if (!srcFilter) srcFilter= &dummyFilter; @@ -1507,6 +1504,7 @@ void sws_freeContext(SwsContext *c) #endif /* HAVE_MMX */ av_freep(&c->yuvTable); + av_free(c->formatConvBuffer); av_free(c); } -- cgit v1.2.3