OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ca48956
)
mpevideo_enc: disallow multiple slices for h261 and flv
author
Anton Khirnov
<anton@khirnov.net>
Wed, 18 Nov 2015 09:32:34 +0000
(10:32 +0100)
committer
Anton Khirnov
<anton@khirnov.net>
Fri, 20 Nov 2015 08:22:48 +0000
(09:22 +0100)
They do not work and produce corrupted output.
CC: libav-stable@libav.org
libavcodec/mpegvideo_enc.c
patch
|
blob
|
history
diff --git
a/libavcodec/mpegvideo_enc.c
b/libavcodec/mpegvideo_enc.c
index
ab4fb32
..
d572b85
100644
(file)
--- 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 &&