aboutsummaryrefslogtreecommitdiffstats
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-04-29 23:13:06 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-04-29 23:13:06 +0200
commit7588b33ad4b33a52ed293c1e36ece496ba842291 (patch)
tree56886ab631384dc6001d5f6af858eb0a432a4d95 /ffmpeg.c
parentdfa07e89289b25d44b6f2b959130077913921e0a (diff)
downloadffmpeg-7588b33ad4b33a52ed293c1e36ece496ba842291.tar.gz
ffmpeg: add the edge at the correct place in allocating of the buffer.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 6efa12c4d9..abceb3f50e 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -546,12 +546,13 @@ static int alloc_buffer(InputStream *ist, AVCodecContext *s, FrameBuffer **pbuf)
if (!buf)
return AVERROR(ENOMEM);
+ avcodec_align_dimensions(s, &w, &h);
+
if (!(s->flags & CODEC_FLAG_EMU_EDGE)) {
w += 2*edge;
h += 2*edge;
}
- avcodec_align_dimensions(s, &w, &h);
if ((ret = av_image_alloc(buf->base, buf->linesize, w, h,
s->pix_fmt, 32)) < 0) {
av_freep(&buf);