/* faststart: moov at the beginning of the file, if supported */
if (mov->flags & FF_MOV_FLAG_FASTSTART) {
- if ((mov->flags & FF_MOV_FLAG_FRAGMENT) ||
- (s->flags & AVFMT_FLAG_CUSTOM_IO)) {
+ if (mov->flags & FF_MOV_FLAG_FRAGMENT) {
av_log(s, AV_LOG_WARNING, "The faststart flag is incompatible "
- "with fragmentation and custom IO, disabling faststart\n");
+ "with fragmentation, disabling faststart\n");
mov->flags &= ~FF_MOV_FLAG_FASTSTART;
- }
+ } else
+ mov->reserved_moov_size = -1;
+ }
+
+ if (!supports_edts(mov) && s->avoid_negative_ts < 0) {
+ s->avoid_negative_ts = 2;
}
/* Non-seekable output is ok if using fragmentation. If ism_lookahead