[FFmpeg-cvslog] lavf: Print a warning if failed to avoid negative timestamps when requested
Michael Niedermayer
git at videolan.org
Fri Nov 7 23:44:58 CET 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Oct 22 16:15:02 2014 +0200| [897d5c3a4296f3da80b8699d1487328ca2de8e55] | committer: Martin Storsjö
lavf: Print a warning if failed to avoid negative timestamps when requested
Signed-off-by: Martin Storsjö <martin at martin.st>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=897d5c3a4296f3da80b8699d1487328ca2de8e55
---
libavformat/mux.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/libavformat/mux.c b/libavformat/mux.c
index 1e80e10..87220ec 100644
--- a/libavformat/mux.c
+++ b/libavformat/mux.c
@@ -341,6 +341,14 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt)
pkt->dts += offset;
if (pkt->pts != AV_NOPTS_VALUE)
pkt->pts += offset;
+
+ if (pkt->dts != AV_NOPTS_VALUE && pkt->dts < 0) {
+ av_log(s, AV_LOG_WARNING,
+ "Packets poorly interleaved, failed to avoid negative "
+ "timestamp %"PRId64" in stream %d.\n"
+ "Try -max_interleave_delta 0 as a possible workaround.\n",
+ pkt->dts, pkt->stream_index);
+ }
}
ret = s->oformat->write_packet(s, pkt);
More information about the ffmpeg-cvslog
mailing list