diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-10-22 16:15:02 +0200 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2014-11-07 12:11:46 +0200 |
commit | 897d5c3a4296f3da80b8699d1487328ca2de8e55 (patch) | |
tree | cc9686ea6c412d09e47bbc91c76b38221e4370d8 | |
parent | 1384df641994bf3d6cb51084290aa94752737bae (diff) | |
download | ffmpeg-897d5c3a4296f3da80b8699d1487328ca2de8e55.tar.gz |
lavf: Print a warning if failed to avoid negative timestamps when requested
Signed-off-by: Martin Storsjö <martin@martin.st>
-rw-r--r-- | libavformat/mux.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavformat/mux.c b/libavformat/mux.c index 1e80e105d7..87220ecd63 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); |