[FFmpeg-cvslog] avformat/mux: assert that timestamps are positive after offsetting them

Michael Niedermayer git at videolan.org
Fri Apr 26 14:58:16 CEST 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Apr 26 11:42:54 2013 +0200| [647f306b461abe357f66b896f31fb91d71c20d58] | committer: Michael Niedermayer

avformat/mux: assert that timestamps are positive after offsetting them

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

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

diff --git a/libavformat/mux.c b/libavformat/mux.c
index de8d198..4781a3e 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) {



More information about the ffmpeg-cvslog mailing list