mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
ffmpeg: add the edge at the correct place in allocating of the buffer.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
dfa07e8928
commit
7588b33ad4
3
ffmpeg.c
3
ffmpeg.c
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user