|
|
@@ -1804,12 +1804,12 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type |
|
|
|
mpegts_find_stream_type(st, desc_tag, DESC_types); |
|
|
|
|
|
|
|
switch (desc_tag) { |
|
|
|
case 0x02: /* video stream descriptor */ |
|
|
|
case VIDEO_STREAM_DESCRIPTOR: |
|
|
|
if (get8(pp, desc_end) & 0x1) { |
|
|
|
st->disposition |= AV_DISPOSITION_STILL_IMAGE; |
|
|
|
} |
|
|
|
break; |
|
|
|
case 0x1E: /* SL descriptor */ |
|
|
|
case SL_DESCRIPTOR: |
|
|
|
desc_es_id = get16(pp, desc_end); |
|
|
|
if (desc_es_id < 0) |
|
|
|
break; |
|
|
@@ -1832,7 +1832,7 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type |
|
|
|
mpegts_open_section_filter(ts, pid, m4sl_cb, ts, 1); |
|
|
|
} |
|
|
|
break; |
|
|
|
case 0x1F: /* FMC descriptor */ |
|
|
|
case FMC_DESCRIPTOR: |
|
|
|
if (get16(pp, desc_end) < 0) |
|
|
|
break; |
|
|
|
if (mp4_descr_count > 0 && |
|
|
@@ -1958,7 +1958,7 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type |
|
|
|
} |
|
|
|
} |
|
|
|
break; |
|
|
|
case 0x0a: /* ISO 639 language descriptor */ |
|
|
|
case ISO_639_LANGUAGE_DESCRIPTOR: |
|
|
|
for (i = 0; i + 4 <= desc_len; i += 4) { |
|
|
|
language[i + 0] = get8(pp, desc_end); |
|
|
|
language[i + 1] = get8(pp, desc_end); |
|
|
@@ -1984,7 +1984,7 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type |
|
|
|
av_dict_set(&st->metadata, "language", language, AV_DICT_DONT_OVERWRITE); |
|
|
|
} |
|
|
|
break; |
|
|
|
case 0x05: /* registration descriptor */ |
|
|
|
case REGISTRATION_DESCRIPTOR: |
|
|
|
st->codecpar->codec_tag = bytestream_get_le32(pp); |
|
|
|
av_log(fc, AV_LOG_TRACE, "reg_desc=%.4s\n", (char *)&st->codecpar->codec_tag); |
|
|
|
if (st->codecpar->codec_id == AV_CODEC_ID_NONE || st->request_probe > 0) { |
|
|
@@ -1996,7 +1996,7 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type |
|
|
|
case 0x52: /* stream identifier descriptor */ |
|
|
|
st->stream_identifier = 1 + get8(pp, desc_end); |
|
|
|
break; |
|
|
|
case 0x26: /* metadata descriptor */ |
|
|
|
case METADATA_DESCRIPTOR: |
|
|
|
if (get16(pp, desc_end) == 0xFFFF) |
|
|
|
*pp += 4; |
|
|
|
if (get8(pp, desc_end) == 0xFF) { |
|
|
@@ -2338,13 +2338,13 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len |
|
|
|
// something else is broken, exit the program_descriptors_loop |
|
|
|
break; |
|
|
|
program_info_length -= len + 2; |
|
|
|
if (tag == 0x1d) { // IOD descriptor |
|
|
|
if (tag == IOD_DESCRIPTOR) { |
|
|
|
get8(&p, p_end); // scope |
|
|
|
get8(&p, p_end); // label |
|
|
|
len -= 2; |
|
|
|
mp4_read_iods(ts->stream, p, len, mp4_descr + mp4_descr_count, |
|
|
|
&mp4_descr_count, MAX_MP4_DESCR_COUNT); |
|
|
|
} else if (tag == 0x05 && len >= 4) { // registration descriptor |
|
|
|
} else if (tag == REGISTRATION_DESCRIPTOR && len >= 4) { |
|
|
|
prog_reg_desc = bytestream_get_le32(&p); |
|
|
|
len -= 4; |
|
|
|
} |
|
|
|