From 6b2fbdb047dac1e3a6c6281226df2b76a3896dad Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 3 May 2013 14:54:13 +0200 Subject: [PATCH] ffmpeg: Check dts before use in non monotone dts workaround Signed-off-by: Michael Niedermayer --- ffmpeg.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ffmpeg.c b/ffmpeg.c index b890580feb..0e0d85d737 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -612,6 +612,7 @@ static void write_frame(AVFormatContext *s, AVPacket *pkt, OutputStream *ost) if (!(s->oformat->flags & AVFMT_NOTIMESTAMPS) && (avctx->codec_type == AVMEDIA_TYPE_AUDIO || avctx->codec_type == AVMEDIA_TYPE_VIDEO) && + pkt->dts != AV_NOPTS_VALUE && ost->last_mux_dts != AV_NOPTS_VALUE && pkt->dts < ost->last_mux_dts + !(s->oformat->flags & AVFMT_TS_NONSTRICT)) { av_log(NULL, AV_LOG_WARNING, "Non-monotonous DTS in output stream "