History

avformat/mpegts: remove obsolate hacks for detecting streams with bad PMTs

Ffmpeg/ffprobe/ffplay sets scan_all_pmts to 1 when finding the streams, that should be enough to handle files for which some early PMTs miss some streams. Fixes ticket #9782.

Marton Balint committed 4 years ago

Commit 58df81b1 parent 54685481 file · +2 −10Browse files

Unified · Split

libavformat/mpegts.c+2−10
@@ -2870,16 +2870,8 @@ static int handle_packet(MpegTSContext *ts, const uint8_t *packet, int64_t pos) · 2869 unmodified lines
28702870 break;
28712871 }
28722872 if (i == ts->nb_prg && ts->nb_prg > 0) {
2873− int types = 0;
2874− for (i = 0; i < ts->stream->nb_streams; i++) {
2875− AVStream *st = ts->stream->streams[i];
2876− if (st->codecpar->codec_type >= 0)
2877− types |= 1<<st->codecpar->codec_type;
2878− }
2879− if ((types & (1<<AVMEDIA_TYPE_AUDIO) && types & (1<<AVMEDIA_TYPE_VIDEO)) || pos > 100000) {
2880− av_log(ts->stream, AV_LOG_DEBUG, "All programs have pmt, headers found\n");
2881− ts->stream->ctx_flags &= ~AVFMTCTX_NOHEADER;
2882− }
2873+ av_log(ts->stream, AV_LOG_DEBUG, "All programs have pmt, headers found\n");
2874+ ts->stream->ctx_flags &= ~AVFMTCTX_NOHEADER;
28832875 }
28842876 }
28852877

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t