aboutsummaryrefslogtreecommitdiffstats
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-02-15 20:31:57 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-02-15 20:35:14 +0100
commit60991ad6ae61e131085891c37e8e517b5014ce21 (patch)
tree919e1e93eeccecfba00fefdf71eb1ae55d827d9e /ffmpeg.c
parent25893ad6c96be126f8c6dd3bfae05679004fc9a2 (diff)
downloadffmpeg-60991ad6ae61e131085891c37e8e517b5014ce21.tar.gz
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 <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 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] +