[FFmpeg-cvslog] ffmpeg: add the edge at the correct place in allocating of the buffer.

Michael Niedermayer git at videolan.org
Mon Apr 30 03:55:53 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Apr 29 23:13:06 2012 +0200| [7588b33ad4b33a52ed293c1e36ece496ba842291] | committer: Michael Niedermayer

ffmpeg: add the edge at the correct place in allocating of the buffer.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7588b33ad4b33a52ed293c1e36ece496ba842291
---

 ffmpeg.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index 6efa12c..abceb3f 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);



More information about the ffmpeg-cvslog mailing list