From 60991ad6ae61e131085891c37e8e517b5014ce21 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 15 Feb 2012 20:31:57 +0100 Subject: [PATCH] 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: Michael Niedermayer --- ffmpeg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ffmpeg.c b/ffmpeg.c index efe579a2e1..8659ff712d 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -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] +