summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-10-21 17:37:08 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-10-21 18:06:18 +0200
commit7846280d1da5e4929bb8fb5adcc4b0c017535bea (patch)
treee9742df52d3e77ead2bb281edf71c1084f86a430 /libavformat
parentde9862a95e0e0a81a3e787e449faa32247feef71 (diff)
mpegts: assert position in dts reading code.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/mpegts.c2
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;
}