Previously the default fragmentation method was only enabled
if writing an ISM file.
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 1e142d5b4842dcb39fcb0e92e4aacbc9977bfa66)
... | ... |
@@ -3316,15 +3316,13 @@ static int mov_write_header(AVFormatContext *s) |
3316 | 3316 |
|
3317 | 3317 |
enable_tracks(s); |
3318 | 3318 |
|
3319 |
- if (mov->mode == MODE_ISM) { |
|
3319 |
+ if (mov->flags & FF_MOV_FLAG_FRAGMENT) { |
|
3320 | 3320 |
/* If no fragmentation options have been set, set a default. */ |
3321 | 3321 |
if (!(mov->flags & (FF_MOV_FLAG_FRAG_KEYFRAME | |
3322 | 3322 |
FF_MOV_FLAG_FRAG_CUSTOM)) && |
3323 | 3323 |
!mov->max_fragment_duration && !mov->max_fragment_size) |
3324 | 3324 |
mov->flags |= FF_MOV_FLAG_FRAG_KEYFRAME; |
3325 |
- } |
|
3326 |
- |
|
3327 |
- if (!(mov->flags & FF_MOV_FLAG_FRAGMENT)) { |
|
3325 |
+ } else { |
|
3328 | 3326 |
if (mov->flags & FF_MOV_FLAG_FASTSTART) |
3329 | 3327 |
mov->reserved_moov_pos = avio_tell(pb); |
3330 | 3328 |
mov_write_mdat_tag(pb, mov); |