Commit 990450c5 authored by Anton Khirnov's avatar Anton Khirnov
Browse files

cmdutils: avoid setting data pointers to invalid values in alloc_buffer()

Fixes bug 352.
parent cb663280
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment