mpegts: assert position in dts reading code.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2011-10-21 17:37:08 +02:00
parent de9862a95e
commit 7846280d1d
1 changed files with 2 additions and 0 deletions

View File

@ -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;
}