From ac08c5c0adcb7f2f9b5ea3eb473d1c2b9659aab2 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 9 May 2014 16:02:30 +0200 Subject: [PATCH] avformat/mux: 2 subtitle packets could have the same DTS Fixes Ticket3514 See: ETSI EN 300 743 V1.3.1 (2006-11) "In summary, all of the segments of a single display set shall be carried in one (or more) PES packets that have the same PTS value." with PTS = DTS and remuxing of such a stream it is to be expected that sometimes multiple packets would have the same DTS Signed-off-by: Michael Niedermayer --- libavformat/mux.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/mux.c b/libavformat/mux.c index 023832c336..adf817112e 100644 --- a/libavformat/mux.c +++ b/libavformat/mux.c @@ -490,6 +490,7 @@ static int compute_pkt_fields2(AVFormatContext *s, AVStream *st, AVPacket *pkt) if (st->cur_dts && st->cur_dts != AV_NOPTS_VALUE && ((!(s->oformat->flags & AVFMT_TS_NONSTRICT) && + st->codec->codec_type != AVMEDIA_TYPE_SUBTITLE && 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: %s >= %s\n", -- 2.11.0