From 7846280d1da5e4929bb8fb5adcc4b0c017535bea Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 21 Oct 2011 17:37:08 +0200 Subject: [PATCH] mpegts: assert position in dts reading code. Signed-off-by: Michael Niedermayer --- libavformat/mpegts.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index 8399e8b4e8..36443cb2b9 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; }