Commit 7588b33a authored by Michael Niedermayer's avatar Michael Niedermayer

ffmpeg: add the edge at the correct place in allocating of the buffer.

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent dfa07e89
......@@ -546,12 +546,13 @@ static int alloc_buffer(InputStream *ist, AVCodecContext *s, FrameBuffer **pbuf)
if (!buf)
return AVERROR(ENOMEM);
avcodec_align_dimensions(s, &w, &h);
if (!(s->flags & CODEC_FLAG_EMU_EDGE)) {
w += 2*edge;
h += 2*edge;
}
avcodec_align_dimensions(s, &w, &h);
if ((ret = av_image_alloc(buf->base, buf->linesize, w, h,
s->pix_fmt, 32)) < 0) {
av_freep(&buf);
......
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