diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-10-21 17:37:08 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-10-21 18:06:18 +0200 |
commit | 7846280d1da5e4929bb8fb5adcc4b0c017535bea (patch) | |
tree | e9742df52d3e77ead2bb281edf71c1084f86a430 | |
parent | de9862a95e0e0a81a3e787e449faa32247feef71 (diff) | |
download | ffmpeg-7846280d1da5e4929bb8fb5adcc4b0c017535bea.tar.gz |
mpegts: assert position in dts reading code.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/mpegts.c | 2 |
1 files changed, 2 insertions, 0 deletions
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; } |