summaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-02-19 14:20:22 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-02-19 14:20:22 +0100
commit3f461566b707b4bdae80281812e80dc25f3dbc9e (patch)
treedb3101d9ed6e675f2db24c4046fcd1e14145d7b4 /libavformat
parentef1aae6ea9aae9a523b6dcd8e670dbca823a88f8 (diff)
downloadffmpeg-streaming-3f461566b707b4bdae80281812e80dc25f3dbc9e.zip
ffmpeg-streaming-3f461566b707b4bdae80281812e80dc25f3dbc9e.tar.gz
avformat/movenc: simplify code, decrease difference to libav
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/movenc.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index d382921..b861cf8 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -3926,13 +3926,6 @@ static int mov_write_header(AVFormatContext *s)
enable_tracks(s);
- 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->reserved_moov_size){
mov->reserved_moov_pos= avio_tell(pb);
@@ -3940,7 +3933,13 @@ static int mov_write_header(AVFormatContext *s)
avio_skip(pb, mov->reserved_moov_size);
}
- if (!(mov->flags & FF_MOV_FLAG_FRAGMENT)) {
+ 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;
+ } else {
if (mov->flags & FF_MOV_FLAG_FASTSTART)
mov->reserved_moov_pos = avio_tell(pb);
mov_write_mdat_tag(pb, mov);
OpenPOWER on IntegriCloud