diff options
author | James Zern <jzern@google.com> | 2011-05-26 22:19:04 +0400 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2012-05-21 03:50:32 +0400 |
commit | e9cef89702e2bde918102e784c6b75a7979e85d1 (patch) | |
tree | 7eb62b52511661d3e0d8f272ca975d4c5d3b8c4a /libavformat/utils.c | |
parent | 5d603f1b655ee717c6639fc2fcb2c13e4a925b6f (diff) |
avformat: Add a flag to mark muxers that allow (non strict) monotone timestamps.
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r-- | libavformat/utils.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index e8430b23fa..438752174e 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -2962,7 +2962,9 @@ static int compute_pkt_fields2(AVFormatContext *s, AVStream *st, AVPacket *pkt){ pkt->dts= st->pts_buffer[0]; } - if(st->cur_dts && st->cur_dts != AV_NOPTS_VALUE && st->cur_dts >= pkt->dts){ + if (st->cur_dts && st->cur_dts != AV_NOPTS_VALUE && + ((!(s->oformat->flags & AVFMT_TS_NONSTRICT) && + st->cur_dts >= pkt->dts) || st->cur_dts > pkt->dts)) { av_log(s, AV_LOG_ERROR, "Application provided invalid, non monotonically increasing dts to muxer in stream %d: %"PRId64" >= %"PRId64"\n", st->index, st->cur_dts, pkt->dts); |