Commit 5dc6c0ea authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/mpegts: check avio_tell() return code before using it

Fixes Ticket2962
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent e0249537
......@@ -1862,8 +1862,10 @@ static int handle_packet(MpegTSContext *ts, const uint8_t *packet)
return 0;
pos = avio_tell(ts->stream->pb);
av_assert0(pos >= TS_PACKET_SIZE);
ts->pos47_full = pos - TS_PACKET_SIZE;
if (pos >= 0) {
av_assert0(pos >= TS_PACKET_SIZE);
ts->pos47_full = pos - TS_PACKET_SIZE;
}
if (tss->type == MPEGTS_SECTION) {
if (is_start) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment