Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2011-05-26 17:15:38 +0400
committerMichael Niedermayer <michaelni@gmx.at>2011-05-28 23:43:33 +0400
commit485d73ef215323ead6cb58a83853d1f6b52ede54 (patch)
tree4aaca0a765d17f82590b1343e0a7f2bc12625cd8 /libswscale/utils.c
parent895e4de8d5a0760a48ba968546693d9094a62013 (diff)
swscale: replace formatConvBuffer[VOF] by allocated array.
This allows to convert between formats of arbitrary width, regardless of the value of VOF/VOFW.
Diffstat (limited to 'libswscale/utils.c')
-rw-r--r--libswscale/utils.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libswscale/utils.c b/libswscale/utils.c
index eba7f82d9e..b0548dcf8e 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -798,6 +798,7 @@ int sws_init_context(SwsContext *c, SwsFilter *srcFilter, SwsFilter *dstFilter)
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*2+78, 16) * 2, fail);
if (!dstFilter) dstFilter= &dummyFilter;
if (!srcFilter) srcFilter= &dummyFilter;
@@ -1522,6 +1523,7 @@ void sws_freeContext(SwsContext *c)
#endif /* HAVE_MMX */
av_freep(&c->yuvTable);
+ av_freep(&c->formatConvBuffer);
av_free(c);
}