diff options
author | Anton Khirnov <anton@khirnov.net> | 2012-09-11 11:03:52 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2012-09-15 14:59:29 +0200 |
commit | 990450c5bf17afc31a81d6225afaac86d0dca5dd (patch) | |
tree | 0e54bef0b38029135a82a9ba565a67109d95a0f5 /cmdutils.c | |
parent | cb6632809d27a0dfe2f63fea1c656bd39ce046ed (diff) | |
download | ffmpeg-990450c5bf17afc31a81d6225afaac86d0dca5dd.tar.gz |
cmdutils: avoid setting data pointers to invalid values in alloc_buffer()
Fixes bug 352.
Diffstat (limited to 'cmdutils.c')
-rw-r--r-- | cmdutils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmdutils.c b/cmdutils.c index 6fb991884f..0d216db469 100644 --- a/cmdutils.c +++ b/cmdutils.c @@ -1316,7 +1316,7 @@ static int alloc_buffer(FrameBuffer **pool, AVCodecContext *s, FrameBuffer **pbu const int v_shift = i==0 ? 0 : v_chroma_shift; if (s->flags & CODEC_FLAG_EMU_EDGE) buf->data[i] = buf->base[i]; - else + else if (buf->base[i]) buf->data[i] = buf->base[i] + FFALIGN((buf->linesize[i]*edge >> v_shift) + (pixel_size*edge >> h_shift), 32); |