diff options
author | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2015-11-22 20:43:26 +0300 |
---|---|---|
committer | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2015-11-22 20:43:26 +0300 |
commit | 819a99ef21e9b0cb4ae0a2620793073d6a242e5a (patch) | |
tree | 3b050d99fbacdc87206b8ed85f10084238857bef | |
parent | 64db3639af7bfe9a5eec6755daf4e52556f3c141 (diff) | |
parent | d80f0a4ad634b3949b91b85f21fd608c0cddeef7 (diff) |
Merge commit 'd80f0a4ad634b3949b91b85f21fd608c0cddeef7'
* commit 'd80f0a4ad634b3949b91b85f21fd608c0cddeef7':
mpevideo_enc: disallow multiple slices for h261 and flv
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
-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 8b32c87c79..887c1bbe8b 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -650,6 +650,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 && |