[FFmpeg-cvslog] ffmpeg: Fix image allocation.
Michael Niedermayer
git at videolan.org
Wed Feb 15 21:39:29 CET 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Feb 15 20:31:57 2012 +0100| [60991ad6ae61e131085891c37e8e517b5014ce21] | committer: 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: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=60991ad6ae61e131085891c37e8e517b5014ce21
---
ffmpeg.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/ffmpeg.c b/ffmpeg.c
index efe579a..8659ff7 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] +
More information about the ffmpeg-cvslog
mailing list