diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-11-16 02:49:12 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-11-16 03:02:29 +0100 |
commit | ce80f9fee97160049687bbbef4eb31a68166c3ee (patch) | |
tree | 9ef61479cbb17c7447b023c211527685ec9b16fa /libavformat/segment.c | |
parent | ec012837527c8448f93f97638c225cbe1f624d3a (diff) | |
download | ffmpeg-ce80f9fee97160049687bbbef4eb31a68166c3ee.tar.gz |
avformat/segment: export inner muxer timebase
Fixes "Non-monotonous DTS in output stream 0:0"
Fixes Ticket4020
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/segment.c')
-rw-r--r-- | libavformat/segment.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavformat/segment.c b/libavformat/segment.c index 4e0af7c158..2cad6e3dab 100644 --- a/libavformat/segment.c +++ b/libavformat/segment.c @@ -570,6 +570,7 @@ static int seg_write_header(AVFormatContext *s) AVFormatContext *oc = NULL; AVDictionary *options = NULL; int ret; + int i; seg->segment_count = 0; if (!seg->write_header_trailer) @@ -675,6 +676,13 @@ static int seg_write_header(AVFormatContext *s) } seg->segment_frame_count = 0; + av_assert0(s->nb_streams == oc->nb_streams); + for (i = 0; i < s->nb_streams; i++) { + AVStream *inner_st = oc->streams[i]; + AVStream *outer_st = s->streams[i]; + avpriv_set_pts_info(outer_st, inner_st->pts_wrap_bits, inner_st->time_base.num, inner_st->time_base.den); + } + if (oc->avoid_negative_ts > 0 && s->avoid_negative_ts < 0) s->avoid_negative_ts = 1; |