mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-27 18:02:11 +00:00
remove unused code in mpegts_get_pcr
This commit is contained in:
parent
a30ef63354
commit
2130d2f594
@ -1718,9 +1718,7 @@ static int64_t mpegts_get_pcr(AVFormatContext *s, int stream_index,
|
|||||||
int64_t pos, timestamp;
|
int64_t pos, timestamp;
|
||||||
uint8_t buf[TS_PACKET_SIZE];
|
uint8_t buf[TS_PACKET_SIZE];
|
||||||
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;
|
||||||
const int find_next= 1;
|
|
||||||
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;
|
||||||
if (find_next) {
|
|
||||||
for(;;) {
|
for(;;) {
|
||||||
avio_seek(s->pb, pos, SEEK_SET);
|
avio_seek(s->pb, pos, SEEK_SET);
|
||||||
if (avio_read(s->pb, buf, TS_PACKET_SIZE) != TS_PACKET_SIZE)
|
if (avio_read(s->pb, buf, TS_PACKET_SIZE) != TS_PACKET_SIZE)
|
||||||
@ -1731,20 +1729,6 @@ static int64_t mpegts_get_pcr(AVFormatContext *s, int stream_index,
|
|||||||
}
|
}
|
||||||
pos += ts->raw_packet_size;
|
pos += ts->raw_packet_size;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
for(;;) {
|
|
||||||
pos -= ts->raw_packet_size;
|
|
||||||
if (pos < 0)
|
|
||||||
return AV_NOPTS_VALUE;
|
|
||||||
avio_seek(s->pb, pos, SEEK_SET);
|
|
||||||
if (avio_read(s->pb, buf, TS_PACKET_SIZE) != TS_PACKET_SIZE)
|
|
||||||
return AV_NOPTS_VALUE;
|
|
||||||
if ((pcr_pid < 0 || (AV_RB16(buf + 1) & 0x1fff) == pcr_pid) &&
|
|
||||||
parse_pcr(×tamp, &pcr_l, buf) == 0) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*ppos = pos;
|
*ppos = pos;
|
||||||
|
|
||||||
return timestamp;
|
return timestamp;
|
||||||
|
Loading…
Reference in New Issue
Block a user