ffmpeg: dont allow -flags to override -pass
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 6 Feb 2013 00:25:52 +0000 (01:25 +0100)
committerCarl Eugen Hoyos <cehoyos@ag.or.at>
Wed, 6 Feb 2013 09:12:20 +0000 (10:12 +0100)
Fixes Ticket2154

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

ffmpeg_opt.c

index d86ef91..6ccb3f4 100644 (file)
@@ -1141,9 +1141,11 @@ static OutputStream *new_video_stream(OptionsContext *o, AVFormatContext *oc, in
         if (do_pass) {
             if (do_pass & 1) {
                 video_enc->flags |= CODEC_FLAG_PASS1;
+                av_dict_set(&ost->opts, "flags", "+pass1", AV_DICT_APPEND);
             }
             if (do_pass & 2) {
                 video_enc->flags |= CODEC_FLAG_PASS2;
+                av_dict_set(&ost->opts, "flags", "+pass2", AV_DICT_APPEND);
             }
         }