mirror of https://git.ffmpeg.org/ffmpeg.git
avformat/mpegts: make sure mpegts_read_header always stops at the first pmt
mpegts_read_header stops parsing the file at the first PMT. However the check that ensured this was wrong because streams can also be added before the first PMT is received (e.g. EIT). So let's make sure we are in the header reading phase by checking if ts->pkt is unset instead of checking if the number of streams found so far is 0. Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
parent
3871326910
commit
bf19833ae2
|
@ -2355,7 +2355,7 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
|
|||
goto out;
|
||||
|
||||
// stop parsing after pmt, we found header
|
||||
if (!ts->stream->nb_streams)
|
||||
if (!ts->pkt)
|
||||
ts->stop_parse = 2;
|
||||
|
||||
set_pmt_found(ts, h->id);
|
||||
|
|
Loading…
Reference in New Issue