}
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);