mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-24 12:09:55 +00:00
cmdutils: avoid setting data pointers to invalid values in alloc_buffer()
Fixes bug 352.
This commit is contained in:
parent
cb6632809d
commit
990450c5bf
@ -1316,7 +1316,7 @@ static int alloc_buffer(FrameBuffer **pool, AVCodecContext *s, FrameBuffer **pbu
|
|||||||
const int v_shift = i==0 ? 0 : v_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->data[i] = buf->base[i];
|
buf->data[i] = buf->base[i];
|
||||||
else
|
else if (buf->base[i])
|
||||||
buf->data[i] = buf->base[i] +
|
buf->data[i] = buf->base[i] +
|
||||||
FFALIGN((buf->linesize[i]*edge >> v_shift) +
|
FFALIGN((buf->linesize[i]*edge >> v_shift) +
|
||||||
(pixel_size*edge >> h_shift), 32);
|
(pixel_size*edge >> h_shift), 32);
|
||||||
|
Loading…
Reference in New Issue
Block a user