]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/frame_thread_encoder.c
vp9: add superframe merging bitstream filter.
[ffmpeg] / libavcodec / frame_thread_encoder.c
index f4d35f90d46e0b076b0dd1c43f75e0e437cf5b1c..04c9a0eb0c2ff1b60af0a54df0d48c85af1be3af 100644 (file)
@@ -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;