[FFmpeg-cvslog] mpegts: assert position in dts reading code.

Michael Niedermayer git at videolan.org
Fri Oct 21 18:08:54 CEST 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Oct 21 17:37:08 2011 +0200| [7846280d1da5e4929bb8fb5adcc4b0c017535bea] | committer: Michael Niedermayer

mpegts: assert position in dts reading code.

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

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

 libavformat/mpegts.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 8399e8b..36443cb 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -27,6 +27,7 @@
 #include "libavutil/dict.h"
 #include "libavutil/mathematics.h"
 #include "libavutil/opt.h"
+#include "libavutil/avassert.h"
 #include "libavcodec/bytestream.h"
 #include "avformat.h"
 #include "mpegts.h"
@@ -1778,6 +1779,7 @@ static int64_t mpegts_get_dts(AVFormatContext *s, int stream_index,
             return AV_NOPTS_VALUE;
         av_free_packet(&pkt);
         if(pkt.stream_index == stream_index && pkt.dts != AV_NOPTS_VALUE){
+            av_assert0(pkt.pos >= 0);
             *ppos= pkt.pos;
             return pkt.dts;
         }



More information about the ffmpeg-cvslog mailing list