diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-04-29 23:13:06 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-04-29 23:13:06 +0200 |
commit | 7588b33ad4b33a52ed293c1e36ece496ba842291 (patch) | |
tree | 56886ab631384dc6001d5f6af858eb0a432a4d95 | |
parent | dfa07e89289b25d44b6f2b959130077913921e0a (diff) | |
download | ffmpeg-7588b33ad4b33a52ed293c1e36ece496ba842291.tar.gz |
ffmpeg: add the edge at the correct place in allocating of the buffer.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | ffmpeg.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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); |