diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2015-11-10 18:23:22 +0100 |
---|---|---|
committer | Hendrik Leppkes <h.leppkes@gmail.com> | 2015-11-10 18:23:22 +0100 |
commit | de0e219a8aba72de201e85385c746cd1c04be1a2 (patch) | |
tree | edd1c194024143fd53e45b3b1448dac90d86b904 | |
parent | 23277aa24c1d3679ebb3f2f0ab13bea5c402fc8f (diff) | |
parent | a0c71a575109f123978e345fa7eb4ac03cd4d3c3 (diff) | |
download | ffmpeg-de0e219a8aba72de201e85385c746cd1c04be1a2.tar.gz |
Merge commit 'a0c71a575109f123978e345fa7eb4ac03cd4d3c3'
* commit 'a0c71a575109f123978e345fa7eb4ac03cd4d3c3':
lavf: initialize cur_dts to AV_NOPTS_VALUE for muxing
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
-rw-r--r-- | libavformat/utils.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 5c4d452df6..bab8118296 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -3778,16 +3778,18 @@ AVStream *avformat_new_stream(AVFormatContext *s, const AVCodec *c) /* default pts setting is MPEG-like */ avpriv_set_pts_info(st, 33, 1, 90000); + /* we set the current DTS to 0 so that formats without any timestamps + * but durations get some timestamps, formats with some unknown + * timestamps have their first few packets buffered and the + * timestamps corrected before they are returned to the user */ + st->cur_dts = RELATIVE_TS_BASE; + } else { + st->cur_dts = AV_NOPTS_VALUE; } st->index = s->nb_streams; st->start_time = AV_NOPTS_VALUE; st->duration = AV_NOPTS_VALUE; - /* we set the current DTS to 0 so that formats without any timestamps - * but durations get some timestamps, formats with some unknown - * timestamps have their first few packets buffered and the - * timestamps corrected before they are returned to the user */ - st->cur_dts = s->iformat ? RELATIVE_TS_BASE : 0; st->first_dts = AV_NOPTS_VALUE; st->probe_packets = MAX_PROBE_PACKETS; st->pts_wrap_reference = AV_NOPTS_VALUE; |