summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-05-09 16:02:30 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-12-29 03:57:44 +0100
commitac08c5c0adcb7f2f9b5ea3eb473d1c2b9659aab2 (patch)
treee054062f59355a2423f2b70c81a69fc9490741d3
parent202947a0665ea523022afb0a6c50eed96bcd6b69 (diff)
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 <michaelni@gmx.at>
-rw-r--r--libavformat/mux.c1
1 files changed, 1 insertions, 0 deletions
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",