also add STREAM_TYPE_PRIVATE_SECTION since a private_section() is not a PES_packet().
Unified · Split
| @@ -2316,8 +2316,18 @@ static int parse_stream_identifier_desc(const uint8_t *p, const uint8_t *p_end) · 2315 unmodified lines | ||
| 2316 | 2316 | |
| 2317 | 2317 | static int is_pes_stream(int stream_type, uint32_t prog_reg_desc) |
| 2318 | 2318 | { |
| 2319 | − return !(stream_type == STREAM_TYPE_ISO_IEC_14496_SECTION || | |
| 2320 | − (stream_type == STREAM_TYPE_SCTE_DATA_SCTE_35 && prog_reg_desc == AV_RL32("CUEI")) ); | |
| 2319 | + switch (stream_type) { | |
| 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 | |
| 2323 | 2333 | static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len) |