[FFmpeg-cvslog] cmdutils: avoid setting data pointers to invalid values in alloc_buffer()

Anton Khirnov git at videolan.org
Thu Oct 25 17:10:48 CEST 2012


ffmpeg | branch: release/0.10 | Anton Khirnov <anton at khirnov.net> | Tue Sep 11 11:03:52 2012 +0200| [141d4ed6c0911fde1913f3b757ace5012eabd897] | committer: Anton Khirnov

cmdutils: avoid setting data pointers to invalid values in alloc_buffer()

Fixes bug 352.
(cherry picked from commit 990450c5bf17afc31a81d6225afaac86d0dca5dd)

Conflicts:
	cmdutils.c

Signed-off-by: Anton Khirnov <anton at khirnov.net>

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

 avconv.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/avconv.c b/avconv.c
index 90bc49c..34507d4 100644
--- a/avconv.c
+++ b/avconv.c
@@ -455,7 +455,7 @@ static int alloc_buffer(InputStream *ist, FrameBuffer **pbuf)
         const int v_shift = i==0 ? 0 : v_chroma_shift;
         if (s->flags & CODEC_FLAG_EMU_EDGE)
             buf->data[i] = buf->base[i];
-        else
+        else if (buf->base[i])
             buf->data[i] = buf->base[i] +
                            FFALIGN((buf->linesize[i]*edge >> v_shift) +
                                    (pixel_size*edge >> h_shift), 32);



More information about the ffmpeg-cvslog mailing list