mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
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>
This commit is contained in:
parent
25893ad6c9
commit
60991ad6ae
2
ffmpeg.c
2
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] +
|
||||
|
Loading…
Reference in New Issue
Block a user