diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-07-15 19:51:02 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-07-15 19:56:24 +0200 |
commit | 5bda0467d284e7f8b15101bbc8b0e417cc4ecb38 (patch) | |
tree | 49854267623ee69d220618e19e7162e48c20fdfc /libavcodec | |
parent | 339d8fb3532a9c0ddd3d4902b798cd220f616919 (diff) | |
download | ffmpeg-5bda0467d284e7f8b15101bbc8b0e417cc4ecb38.tar.gz |
avcodec/mpegvideo_enc: make edge for interlaced mpeg2 encoding smaller
Fixes segfault
the size can probably be reduced further for the mpeg2 case
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/mpegvideo_enc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index 4bb79f66ce..a4786b4a3a 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -1146,7 +1146,8 @@ static int load_input_picture(MpegEncContext *s, const AVFrame *pic_arg) int vpad = 16; if ( s->codec_id == AV_CODEC_ID_MPEG2VIDEO - && !s->progressive_sequence) + && !s->progressive_sequence + && FFALIGN(s->height, 32) - s->height > 16) vpad = 32; if (!s->avctx->rc_buffer_size) |