summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-05-02 10:45:21 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-05-02 10:48:28 +0200
commitb197c1c1acac18cb9c9a54a9bd0bb13a8539bc3c (patch)
tree4b7ea0e72eec5de07e31b7ebb0f82e457f2e4ccf /ffmpeg.c
parent8501bed08ce44e30a8bf926fe6700225d65d7b24 (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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index a13dcf73f6..f395a44500 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] +