mirror of https://git.ffmpeg.org/ffmpeg.git
ffmpeg: preserve NULL ptrs in get_buffer()
Fixes Ticket1260, Ticket1267 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
8501bed08c
commit
b197c1c1ac
2
ffmpeg.c
2
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] +
|
||||
|
|
Loading…
Reference in New Issue