History

avformat/mpegts: is_pes_stream() use switch case

also add STREAM_TYPE_PRIVATE_SECTION since a private_section() is not a PES_packet().

Scott Theisen committed 1 year ago

Commit 5ba63f01 parent 12597601 file · +12 −2Browse files

Unified · Split

libavformat/mpegts.c+12−2
@@ -2316,8 +2316,18 @@ static int parse_stream_identifier_desc(const uint8_t *p, const uint8_t *p_end) · 2315 unmodified lines
2316 2316
2317static int is_pes_stream(int stream_type, uint32_t prog_reg_desc)2317static int is_pes_stream(int stream_type, uint32_t prog_reg_desc)
2318{2318{
2319 return !(stream_type == STREAM_TYPE_ISO_IEC_14496_SECTION ||2319 switch (stream_type) {
2320 (stream_type == STREAM_TYPE_SCTE_DATA_SCTE_35 && prog_reg_desc == AV_RL32("CUEI")) );2320 case STREAM_TYPE_PRIVATE_SECTION:
2321 case STREAM_TYPE_ISO_IEC_14496_SECTION:
2322 return 0;
2323 case STREAM_TYPE_SCTE_DATA_SCTE_35:
2324 /* This User Private stream_type value is used by multiple organizations
2325 for different things. ANSI/SCTE 35 splice_info_section() is a
2326 private_section() not a PES_packet(). */
2327 return !(prog_reg_desc == AV_RL32("CUEI"));
2328 default:
2329 return 1;
2330 }
2321}2331}
2322 2332
2323static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len)2333static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len)

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