diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-05-02 12:45:21 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-05-02 12:48:28 +0400 |
commit | b197c1c1acac18cb9c9a54a9bd0bb13a8539bc3c (patch) | |
tree | 4b7ea0e72eec5de07e31b7ebb0f82e457f2e4ccf /ffmpeg.c | |
parent | 8501bed08ce44e30a8bf926fe6700225d65d7b24 (diff) |
ffmpeg: preserve NULL ptrs in get_buffer()
Fixes Ticket1260, Ticket1267
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r-- | ffmpeg.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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] + |