Commit 46405813 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge remote-tracking branch 'qatar/master'

* qatar/master:
  movenc: Simplify setting the fragmentation flag

Conflicts:
	libavformat/movenc.c
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents ada9b17e bdf99042
...@@ -3602,6 +3602,7 @@ static int mov_write_header(AVFormatContext *s) ...@@ -3602,6 +3602,7 @@ static int mov_write_header(AVFormatContext *s)
/* Set the FRAGMENT flag if any of the fragmentation methods are /* Set the FRAGMENT flag if any of the fragmentation methods are
* enabled. */ * enabled. */
if (mov->max_fragment_duration || mov->max_fragment_size || if (mov->max_fragment_duration || mov->max_fragment_size ||
(s->oformat && !strcmp(s->oformat->name, "ismv")) ||
mov->flags & (FF_MOV_FLAG_EMPTY_MOOV | mov->flags & (FF_MOV_FLAG_EMPTY_MOOV |
FF_MOV_FLAG_FRAG_KEYFRAME | FF_MOV_FLAG_FRAG_KEYFRAME |
FF_MOV_FLAG_FRAG_CUSTOM)) FF_MOV_FLAG_FRAG_CUSTOM))
...@@ -3625,9 +3626,7 @@ static int mov_write_header(AVFormatContext *s) ...@@ -3625,9 +3626,7 @@ static int mov_write_header(AVFormatContext *s)
/* Non-seekable output is ok if using fragmentation. If ism_lookahead /* Non-seekable output is ok if using fragmentation. If ism_lookahead
* is enabled, we don't support non-seekable output at all. */ * is enabled, we don't support non-seekable output at all. */
if (!s->pb->seekable && if (!s->pb->seekable &&
((!(mov->flags & FF_MOV_FLAG_FRAGMENT) && (!(mov->flags & FF_MOV_FLAG_FRAGMENT) || mov->ism_lookahead)) {
strcmp(s->oformat->name, "ismv"))
|| mov->ism_lookahead)) {
av_log(s, AV_LOG_ERROR, "muxer does not support non seekable output\n"); av_log(s, AV_LOG_ERROR, "muxer does not support non seekable output\n");
return -1; return -1;
} }
...@@ -3812,8 +3811,7 @@ static int mov_write_header(AVFormatContext *s) ...@@ -3812,8 +3811,7 @@ static int mov_write_header(AVFormatContext *s)
FF_MOV_FLAG_FRAG_CUSTOM)) && FF_MOV_FLAG_FRAG_CUSTOM)) &&
!mov->max_fragment_duration && !mov->max_fragment_size) !mov->max_fragment_duration && !mov->max_fragment_size)
mov->max_fragment_duration = 5000000; mov->max_fragment_duration = 5000000;
mov->flags |= FF_MOV_FLAG_EMPTY_MOOV | FF_MOV_FLAG_SEPARATE_MOOF | mov->flags |= FF_MOV_FLAG_EMPTY_MOOV | FF_MOV_FLAG_SEPARATE_MOOF;
FF_MOV_FLAG_FRAGMENT;
} }
if (mov->reserved_moov_size){ if (mov->reserved_moov_size){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment