[FFmpeg-cvslog] ffmpeg: preserve NULL ptrs in get_buffer()

Michael Niedermayer git at videolan.org
Wed May 2 11:34:17 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed May  2 10:45:21 2012 +0200| [b197c1c1acac18cb9c9a54a9bd0bb13a8539bc3c] | committer: Michael Niedermayer

ffmpeg: preserve NULL ptrs in get_buffer()

Fixes Ticket1260, Ticket1267

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

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

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

diff --git a/ffmpeg.c b/ffmpeg.c
index a13dcf7..f395a44 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -569,7 +569,7 @@ static int alloc_buffer(InputStream *ist, AVCodecContext *s, FrameBuffer **pbuf)
     for (i = 0; i < FF_ARRAY_ELEMS(buf->data); i++) {
         const int h_shift = i==0 ? 0 : h_chroma_shift;
         const int v_shift = i==0 ? 0 : v_chroma_shift;
-        if ((s->flags & CODEC_FLAG_EMU_EDGE) || !buf->linesize[1])
+        if ((s->flags & CODEC_FLAG_EMU_EDGE) || !buf->linesize[1] || !buf->base[i])
             buf->data[i] = buf->base[i];
         else
             buf->data[i] = buf->base[i] +



More information about the ffmpeg-cvslog mailing list