]> git.sesse.net Git - ffmpeg/blobdiff - fftools/ffmpeg_opt.c
avformat/avio: Add Metacube support
[ffmpeg] / fftools / ffmpeg_opt.c
index e66141f3ab299da782f4ea8166c5224f6185b2ed..f6b1c6d632a4eedaa4ea0a228a4eed94d23dcbe5 100644 (file)
@@ -2442,19 +2442,6 @@ loop_end:
         avio_closep(&pb);
     }
 
-#if FF_API_LAVF_AVCTX
-    for (i = nb_output_streams - oc->nb_streams; i < nb_output_streams; i++) { //for all streams of this output file
-        AVDictionaryEntry *e;
-        ost = output_streams[i];
-
-        if ((ost->stream_copy || ost->attachment_filename)
-            && (e = av_dict_get(o->g->codec_opts, "flags", NULL, AV_DICT_IGNORE_SUFFIX))
-            && (!e->key[5] || check_stream_specifier(oc, ost->st, e->key+6)))
-            if (av_opt_set(ost->st->codec, "flags", e->value, 0) < 0)
-                exit_program(1);
-    }
-#endif
-
     if (!oc->nb_streams && !(oc->oformat->flags & AVFMT_NOSTREAMS)) {
         av_dump_format(oc, nb_output_files - 1, oc->url, 1);
         av_log(NULL, AV_LOG_ERROR, "Output file #%d does not contain any stream\n", nb_output_files - 1);
@@ -2601,11 +2588,15 @@ loop_end:
     }
 
     if (!(oc->oformat->flags & AVFMT_NOFILE)) {
+        int flags = AVIO_FLAG_WRITE;
+        if (format_flags & AVFMT_FLAG_METACUBE)
+            flags |= AVIO_FLAG_METACUBE;
+
         /* test if it already exists to avoid losing precious files */
         assert_file_overwrite(filename);
 
         /* open the file */
-        if ((err = avio_open2(&oc->pb, filename, AVIO_FLAG_WRITE,
+        if ((err = avio_open2(&oc->pb, filename, flags,
                               &oc->interrupt_callback,
                               &of->opts)) < 0) {
             print_error(filename, err);