Commit 60991ad6 authored by Michael Niedermayer's avatar Michael Niedermayer

ffmpeg: Fix image allocation.

This probably fixes some of the use of uninitialized issues valgrind shows in fate.
It might also fix other issues.
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 25893ad6
......@@ -510,7 +510,7 @@ static int alloc_buffer(AVCodecContext *s, InputStream *ist, 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)
if ((s->flags & CODEC_FLAG_EMU_EDGE) || !buf->linesize[1])
buf->data[i] = buf->base[i];
else
buf->data[i] = buf->base[i] +
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment