diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-02-04 15:37:05 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-02-04 15:37:05 +0100 |
commit | 073e771c9c5330216bdb3def5bd3ab671930b27f (patch) | |
tree | 58140d37740badbf5e41340c595212a272139102 /libavformat/mux.c | |
parent | 5144d919964f050d953b9dbe6910fb5388a1965d (diff) | |
parent | 33c859c142ef3f49b7a6227014ad92a680cf4d74 (diff) | |
download | ffmpeg-073e771c9c5330216bdb3def5bd3ab671930b27f.tar.gz |
Merge commit '33c859c142ef3f49b7a6227014ad92a680cf4d74'
* commit '33c859c142ef3f49b7a6227014ad92a680cf4d74':
lavf: ignore attachment streams for interleaving purposes
Conflicts:
libavformat/avformat.h
libavformat/internal.h
libavformat/mux.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/mux.c')
-rw-r--r-- | libavformat/mux.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libavformat/mux.c b/libavformat/mux.c index aebfe2c8f7..71a099f643 100644 --- a/libavformat/mux.c +++ b/libavformat/mux.c @@ -320,6 +320,9 @@ static int init_muxer(AVFormatContext *s, AVDictionary **options) av_log(s, AV_LOG_WARNING, "Codec for stream %d does not use global headers " "but container format requires global headers\n", i); + + if (codec->codec_type != AVMEDIA_TYPE_ATTACHMENT) + s->internal->nb_interleaved_streams++; } if (!s->priv_data && of->priv_data_size > 0) { @@ -727,7 +730,7 @@ int ff_interleave_packet_per_dts(AVFormatContext *s, AVPacket *out, } } - if (s->nb_streams == stream_count) { + if (s->internal->nb_interleaved_streams == stream_count) { flush = 1; } else if (!flush) { for (i=0; i < s->nb_streams; i++) { @@ -742,7 +745,7 @@ int ff_interleave_packet_per_dts(AVFormatContext *s, AVPacket *out, delta_dts_max= FFMAX(delta_dts_max, delta_dts); } } - if (s->nb_streams == stream_count+noninterleaved_count && + if (s->internal->nb_interleaved_streams == stream_count+noninterleaved_count && delta_dts_max > 20*AV_TIME_BASE) { av_log(s, AV_LOG_DEBUG, "flushing with %d noninterleaved\n", noninterleaved_count); flush = 1; |