mpegts: replace some magic numbers with the existing define
Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
parent
72cb904453
commit
65a25adc97
@ -635,7 +635,7 @@ static void new_pes_packet(PESContext *pes, AVPacket *pkt)
|
|||||||
pkt->size = pes->data_index;
|
pkt->size = pes->data_index;
|
||||||
|
|
||||||
if(pes->total_size != MAX_PES_PAYLOAD &&
|
if(pes->total_size != MAX_PES_PAYLOAD &&
|
||||||
pes->pes_header_size + pes->data_index != pes->total_size + 6) {
|
pes->pes_header_size + pes->data_index != pes->total_size + PES_START_SIZE) {
|
||||||
av_log(pes->stream, AV_LOG_WARNING, "PES packet size mismatch\n");
|
av_log(pes->stream, AV_LOG_WARNING, "PES packet size mismatch\n");
|
||||||
pes->flags |= AV_PKT_FLAG_CORRUPT;
|
pes->flags |= AV_PKT_FLAG_CORRUPT;
|
||||||
}
|
}
|
||||||
@ -918,9 +918,9 @@ static int mpegts_push_data(MpegTSFilter *filter,
|
|||||||
* decreases demuxer delay for infrequent packets like subtitles from
|
* decreases demuxer delay for infrequent packets like subtitles from
|
||||||
* a couple of seconds to milliseconds for properly muxed files.
|
* a couple of seconds to milliseconds for properly muxed files.
|
||||||
* total_size is the number of bytes following pes_packet_length
|
* total_size is the number of bytes following pes_packet_length
|
||||||
* in the pes header, i.e. not counting the first 6 bytes */
|
* in the pes header, i.e. not counting the first PES_START_SIZE bytes */
|
||||||
if (!ts->stop_parse && pes->total_size < MAX_PES_PAYLOAD &&
|
if (!ts->stop_parse && pes->total_size < MAX_PES_PAYLOAD &&
|
||||||
pes->pes_header_size + pes->data_index == pes->total_size + 6) {
|
pes->pes_header_size + pes->data_index == pes->total_size + PES_START_SIZE) {
|
||||||
ts->stop_parse = 1;
|
ts->stop_parse = 1;
|
||||||
new_pes_packet(pes, ts->pkt);
|
new_pes_packet(pes, ts->pkt);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user