aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2014-02-18 16:11:59 +0200
committerReinhard Tartler <siretart@tauware.de>2014-03-09 16:57:53 -0400
commit1c1e252cd1cbd5f59fe118c49f6d7207dbdfdbd4 (patch)
treee6ce55f11eaa51a6e3dd45e369e565fbe16614a9
parentca2c9d6b9bfadb64e1502594fdf745a391699890 (diff)
downloadffmpeg-1c1e252cd1cbd5f59fe118c49f6d7207dbdfdbd4.tar.gz
movenc: Add a fallback fragmentation method for plain mp4 as well
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)
-rw-r--r--libavformat/movenc.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 5bc0ca383b..6344e38298 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -3316,15 +3316,13 @@ static int mov_write_header(AVFormatContext *s)
enable_tracks(s);
- if (mov->mode == MODE_ISM) {
+ if (mov->flags & FF_MOV_FLAG_FRAGMENT) {
/* If no fragmentation options have been set, set a default. */
if (!(mov->flags & (FF_MOV_FLAG_FRAG_KEYFRAME |
FF_MOV_FLAG_FRAG_CUSTOM)) &&
!mov->max_fragment_duration && !mov->max_fragment_size)
mov->flags |= FF_MOV_FLAG_FRAG_KEYFRAME;
- }
-
- if (!(mov->flags & FF_MOV_FLAG_FRAGMENT)) {
+ } else {
if (mov->flags & FF_MOV_FLAG_FASTSTART)
mov->reserved_moov_pos = avio_tell(pb);
mov_write_mdat_tag(pb, mov);