summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-04-08 16:46:36 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-04-08 16:48:34 +0200
commit8dfbc1c5cf7973f9ffb5c9857db5d4c03a896686 (patch)
treeeb2252a5d24ebd77a636bc59ed998f597bbfded7 /libavcodec
parent1b295a17d75c5ac9f509e0ea8a88634839c9ec64 (diff)
ffv1: allow enabling of version 2 by using some of its features.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/ffv1.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libavcodec/ffv1.c b/libavcodec/ffv1.c
index ca58d09823..4c8ef4bc85 100644
--- a/libavcodec/ffv1.c
+++ b/libavcodec/ffv1.c
@@ -873,6 +873,15 @@ static av_cold int encode_init(AVCodecContext *avctx)
common_init(avctx);
s->version=0;
+
+ if((avctx->flags & (CODEC_FLAG_PASS1|CODEC_FLAG_PASS2)) || avctx->slices>1)
+ s->version = FFMAX(s->version, 2);
+
+ if(s->version >= 2 && avctx->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL) {
+ av_log(avctx, AV_LOG_ERROR, "Version 2 needed for requested features but version 2 is experimental and not enabled\n");
+ return -1;
+ }
+
s->ac= avctx->coder_type ? 2:0;
if(s->ac>1)