summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-09-10 10:20:11 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-09-10 10:20:11 +0200
commit46405813c3c15caf8cee1cf9fa2bbaeead35c7cd (patch)
tree43fd6900bac0a64ec18e5fe0d373575492c4a691
parentada9b17e7a3d63b5c58d493006d7b17aa2617813 (diff)
parentbdf990425e2be6912a6d29f032ca558448c8635a (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: movenc: Simplify setting the fragmentation flag Conflicts: libavformat/movenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/movenc.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index d23b1a1a3e..7704b1a206 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -3602,6 +3602,7 @@ static int mov_write_header(AVFormatContext *s)
/* Set the FRAGMENT flag if any of the fragmentation methods are
* enabled. */
if (mov->max_fragment_duration || mov->max_fragment_size ||
+ (s->oformat && !strcmp(s->oformat->name, "ismv")) ||
mov->flags & (FF_MOV_FLAG_EMPTY_MOOV |
FF_MOV_FLAG_FRAG_KEYFRAME |
FF_MOV_FLAG_FRAG_CUSTOM))
@@ -3625,9 +3626,7 @@ static int mov_write_header(AVFormatContext *s)
/* Non-seekable output is ok if using fragmentation. If ism_lookahead
* is enabled, we don't support non-seekable output at all. */
if (!s->pb->seekable &&
- ((!(mov->flags & FF_MOV_FLAG_FRAGMENT) &&
- strcmp(s->oformat->name, "ismv"))
- || mov->ism_lookahead)) {
+ (!(mov->flags & FF_MOV_FLAG_FRAGMENT) || mov->ism_lookahead)) {
av_log(s, AV_LOG_ERROR, "muxer does not support non seekable output\n");
return -1;
}
@@ -3812,8 +3811,7 @@ static int mov_write_header(AVFormatContext *s)
FF_MOV_FLAG_FRAG_CUSTOM)) &&
!mov->max_fragment_duration && !mov->max_fragment_size)
mov->max_fragment_duration = 5000000;
- mov->flags |= FF_MOV_FLAG_EMPTY_MOOV | FF_MOV_FLAG_SEPARATE_MOOF |
- FF_MOV_FLAG_FRAGMENT;
+ mov->flags |= FF_MOV_FLAG_EMPTY_MOOV | FF_MOV_FLAG_SEPARATE_MOOF;
}
if (mov->reserved_moov_size){