[SCM] libav/experimental: movenc: Add a fallback fragmentation method for plain mp4 as well

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Aug 10 16:01:25 UTC 2014


The following commit has been merged in the experimental branch:
commit 1e142d5b4842dcb39fcb0e92e4aacbc9977bfa66
Author: Martin Storsjö <martin at martin.st>
Date:   Tue Feb 18 16:11:59 2014 +0200

    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 at martin.st>

diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 43a1647..762cfef 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -3315,15 +3315,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);

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list