Browse code

ffmpeg: dont allow -flags to override -pass

Fixes Ticket2154

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit ccf9dd00da055e94117b56cead4af80ff331b00e)

Conflicts:
ffmpeg_opt.c

Michael Niedermayer authored on 2013/02/06 09:25:52
Showing 1 changed files
... ...
@@ -4068,9 +4068,11 @@ static OutputStream *new_video_stream(OptionsContext *o, AVFormatContext *oc)
4068 4068
         if (do_pass) {
4069 4069
             if (do_pass & 1) {
4070 4070
                 video_enc->flags |= CODEC_FLAG_PASS1;
4071
+                av_dict_set(&ost->opts, "flags", "+pass1", AV_DICT_APPEND);
4071 4072
             }
4072 4073
             if (do_pass & 2) {
4073 4074
                 video_enc->flags |= CODEC_FLAG_PASS2;
4075
+                av_dict_set(&ost->opts, "flags", "+pass2", AV_DICT_APPEND);
4074 4076
             }
4075 4077
         }
4076 4078