forked from FFmpeg/FFmpeg
avformat/mpegts: Continue parsing PMTs until at least 2 streams are found or 100kb are reached
This (ugly) hack fixes Ticket3348 If someone has an idea on how to fix this nicer, that would be very welcome but the stream contains several PMTs with just one of the 2 streams at the start Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
ad61419bbf
commit
29986885ef
1 changed files with 4 additions and 2 deletions
|
@ -1988,10 +1988,12 @@ static int handle_packet(MpegTSContext *ts, const uint8_t *packet)
|
|||
break;
|
||||
}
|
||||
if (i == ts->nb_prg && ts->nb_prg > 0) {
|
||||
if (ts->stream->nb_streams > 1 || pos > 100000) {
|
||||
av_log(ts->stream, AV_LOG_DEBUG, "All programs have pmt, headers found\n");
|
||||
ts->stream->ctx_flags &= ~AVFMTCTX_NOHEADER;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
int ret;
|
||||
|
|
Loading…
Add table
Reference in a new issue