movenc: Use keyframes as default fragmentation point in ismv
authorMartin Storsjö <martin@martin.st>
Tue, 10 Sep 2013 15:43:19 +0000 (18:43 +0300)
committerMartin Storsjö <martin@martin.st>
Sun, 22 Sep 2013 13:10:21 +0000 (16:10 +0300)
Fragmenting blindly to a certain duration isn't a good choice
if one should be able to switch between different qualities,
therefore default to keyframes instead.

Signed-off-by: Martin Storsjö <martin@martin.st>
libavformat/movenc.c

index 16107b1..f4bd990 100644 (file)
@@ -3300,7 +3300,7 @@ static int mov_write_header(AVFormatContext *s)
         if (!(mov->flags & (FF_MOV_FLAG_FRAG_KEYFRAME |
                             FF_MOV_FLAG_FRAG_CUSTOM)) &&
             !mov->max_fragment_duration && !mov->max_fragment_size)
-            mov->max_fragment_duration = 5000000;
+            mov->flags |= FF_MOV_FLAG_FRAG_KEYFRAME;
     }
 
     if (!(mov->flags & FF_MOV_FLAG_FRAGMENT)) {