mirror of https://git.ffmpeg.org/ffmpeg.git
check return value of url_fseek in mpegts_get_pcr
This commit is contained in:
parent
880e83827f
commit
0a90b6a43e
|
@ -1720,7 +1720,8 @@ static int64_t mpegts_get_pcr(AVFormatContext *s, int stream_index,
|
||||||
int pcr_l, pcr_pid = ((PESContext*)s->streams[stream_index]->priv_data)->pcr_pid;
|
int pcr_l, pcr_pid = ((PESContext*)s->streams[stream_index]->priv_data)->pcr_pid;
|
||||||
pos = ((*ppos + ts->raw_packet_size - 1 - ts->pos47) / ts->raw_packet_size) * ts->raw_packet_size + ts->pos47;
|
pos = ((*ppos + ts->raw_packet_size - 1 - ts->pos47) / ts->raw_packet_size) * ts->raw_packet_size + ts->pos47;
|
||||||
while(pos < pos_limit) {
|
while(pos < pos_limit) {
|
||||||
avio_seek(s->pb, pos, SEEK_SET);
|
if (avio_seek(s->pb, pos, SEEK_SET) < 0)
|
||||||
|
return AV_NOPTS_VALUE;
|
||||||
if (avio_read(s->pb, buf, TS_PACKET_SIZE) != TS_PACKET_SIZE)
|
if (avio_read(s->pb, buf, TS_PACKET_SIZE) != TS_PACKET_SIZE)
|
||||||
return AV_NOPTS_VALUE;
|
return AV_NOPTS_VALUE;
|
||||||
if ((pcr_pid < 0 || (AV_RB16(buf + 1) & 0x1fff) == pcr_pid) &&
|
if ((pcr_pid < 0 || (AV_RB16(buf + 1) & 0x1fff) == pcr_pid) &&
|
||||||
|
|
Loading…
Reference in New Issue