diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-02-15 20:31:57 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-02-15 20:35:14 +0100 |
commit | 60991ad6ae61e131085891c37e8e517b5014ce21 (patch) | |
tree | 919e1e93eeccecfba00fefdf71eb1ae55d827d9e /ffmpeg.c | |
parent | 25893ad6c96be126f8c6dd3bfae05679004fc9a2 (diff) | |
download | ffmpeg-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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] + |