summaryrefslogtreecommitdiff
path: root/libavcodec/frame_thread_encoder.c
diff options
context:
space:
mode:
authorDerek Buitenhuis <derek.buitenhuis@gmail.com>2016-01-28 17:19:06 +0000
committerDerek Buitenhuis <derek.buitenhuis@gmail.com>2016-01-28 17:19:06 +0000
commit1a2d6055beed34547fbfa1f7753e9a557058cf04 (patch)
tree0767d0d3f36f010552b8c89a2ded8b5f1d2202b8 /libavcodec/frame_thread_encoder.c
parent5b0d4c247a3c3ba8a8ece70b31354121645c8320 (diff)
avcodec/frame_thread_encoder: Check the private option for huffy's context modelling
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Diffstat (limited to 'libavcodec/frame_thread_encoder.c')
-rw-r--r--libavcodec/frame_thread_encoder.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libavcodec/frame_thread_encoder.c b/libavcodec/frame_thread_encoder.c
index f4d35f90d4..04c9a0eb0c 100644
--- a/libavcodec/frame_thread_encoder.c
+++ b/libavcodec/frame_thread_encoder.c
@@ -136,9 +136,15 @@ int ff_frame_thread_encoder_init(AVCodecContext *avctx, AVDictionary *options){
if (avctx->codec_id == AV_CODEC_ID_HUFFYUV ||
avctx->codec_id == AV_CODEC_ID_FFVHUFF) {
int warn = 0;
+ int context_model = 0;
+ AVDictionaryEntry *con = av_dict_get(options, "context", NULL, AV_DICT_MATCH_CASE);
+
+ if (con && con->value)
+ context_model = atoi(con->value);
+
if (avctx->flags & AV_CODEC_FLAG_PASS1)
warn = 1;
- else if(avctx->context_model > 0) {
+ else if(context_model > 0) {
AVDictionaryEntry *t = av_dict_get(options, "non_deterministic",
NULL, AV_DICT_MATCH_CASE);
warn = !t || !t->value || !atoi(t->value) ? 1 : 0;