diff options
author | Anton Khirnov <anton@khirnov.net> | 2015-11-18 10:32:34 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2015-11-20 09:22:48 +0100 |
commit | d80f0a4ad634b3949b91b85f21fd608c0cddeef7 (patch) | |
tree | 127914c97f568b502412b77761fe8240993411c6 | |
parent | ca489564ae150bc41764f175b88151d883e69ae0 (diff) | |
download | ffmpeg-d80f0a4ad634b3949b91b85f21fd608c0cddeef7.tar.gz |
mpevideo_enc: disallow multiple slices for h261 and flv
They do not work and produce corrupted output.
CC: libav-stable@libav.org
-rw-r--r-- | libavcodec/mpegvideo_enc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index ab4fb32bed..d572b859a0 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -496,6 +496,12 @@ FF_ENABLE_DEPRECATION_WARNINGS } } + if (avctx->slices > 1 && + (avctx->codec_id == AV_CODEC_ID_FLV1 || avctx->codec_id == AV_CODEC_ID_H261)) { + av_log(avctx, AV_LOG_ERROR, "Multiple slices are not supported by this codec\n"); + return AVERROR(EINVAL); + } + if (s->avctx->thread_count > 1 && s->codec_id != AV_CODEC_ID_MPEG4 && s->codec_id != AV_CODEC_ID_MPEG1VIDEO && |