diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-04-26 11:42:54 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-04-26 14:51:47 +0200 |
commit | 647f306b461abe357f66b896f31fb91d71c20d58 (patch) | |
tree | 8206c9a26207aacdacc012a1783771f931b22044 /libavformat | |
parent | c329195a27129c7e64af595ce351e3bbf1b9bf1c (diff) | |
download | ffmpeg-647f306b461abe357f66b896f31fb91d71c20d58.tar.gz |
avformat/mux: assert that timestamps are positive after offsetting them
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/mux.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/mux.c b/libavformat/mux.c index de8d1981e8..4781a3e8de 100644 --- a/libavformat/mux.c +++ b/libavformat/mux.c @@ -518,6 +518,8 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt) pkt->dts += offset; if (pkt->pts != AV_NOPTS_VALUE) pkt->pts += offset; + + av_assert2(pkt->dts == AV_NOPTS_VALUE || pkt->dts >= 0); } if (!(s->oformat->flags & (AVFMT_TS_NEGATIVE | AVFMT_NOTIMESTAMPS)) && 0) { |