[FFmpeg-cvslog] avformat/mux: 2 subtitle packets could have the same DTS

Michael Niedermayer git at videolan.org
Mon Dec 29 04:41:22 CET 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri May  9 16:02:30 2014 +0200| [ac08c5c0adcb7f2f9b5ea3eb473d1c2b9659aab2] | committer: Michael Niedermayer

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 at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ac08c5c0adcb7f2f9b5ea3eb473d1c2b9659aab2
---

 libavformat/mux.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/mux.c b/libavformat/mux.c
index 023832c..adf8171 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",



More information about the ffmpeg-cvslog mailing list