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
2870 break;2870 break;
2871 }2871 }
2872 if (i == ts->nb_prg && ts->nb_prg > 0) {2872 if (i == ts->nb_prg && ts->nb_prg > 0) {
2873 int types = 0;2873 av_log(ts->stream, AV_LOG_DEBUG, "All programs have pmt, headers found\n");
2874 for (i = 0; i < ts->stream->nb_streams; i++) {2874 ts->stream->ctx_flags &= ~AVFMTCTX_NOHEADER;
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 }
2883 }2875 }
2884 }2876 }
2885 2877

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