@@ -19,6 +19,7 @@ API changes, most recent first:
Remove unused AV_PROGRAM_RUNNING
Add AV_PROGRAM_CHANGED
Add pmt_version field to AVProgram
+ Add program_num, pmt_version, pmt_stream_idx to AVStream
2018-05-xx - xxxxxxxxxx - lavf 58.14.100 - avformat.h
Add AV_DISPOSITION_STILL_IMAGE
@@ -1103,6 +1103,13 @@ typedef struct AVStream {
*/
int stream_identifier;
+ /**
+ * Details of the MPEG-TS program which created this stream.
+ */
+ int program_num;
+ int pmt_version;
+ int pmt_stream_idx;
+
int64_t interleaver_chunk_size;
int64_t interleaver_chunk_duration;
@@ -2162,7 +2162,7 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
set_pmt_found(ts, h->id);
- for (;;) {
+ for (i = 0; ; i++) {
st = 0;
pes = NULL;
stream_type = get8(&p, p_end);
@@ -2193,6 +2193,9 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
if (!pes->st)
goto out;
pes->st->id = pes->pid;
+ pes->st->program_num = h->id;
+ pes->st->pmt_version = h->version;
+ pes->st->pmt_stream_idx = i;
}
st = pes->st;
} else if (is_pes_stream(stream_type, prog_reg_desc)) {
@@ -2211,6 +2214,9 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
if (!st)
goto out;
st->id = pes->pid;
+ st->program_num = h->id;
+ st->pmt_version = h->version;
+ st->pmt_stream_idx = i;
}
} else {
int idx = ff_find_stream_index(ts->stream, pid);
@@ -2225,6 +2231,9 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
if (!st)
goto out;
st->id = pid;
+ st->program_num = h->id;
+ st->pmt_version = h->version;
+ st->pmt_stream_idx = i;
st->codecpar->codec_type = AVMEDIA_TYPE_DATA;
if (stream_type == 0x86 && prog_reg_desc == AV_RL32("CUEI")) {
mpegts_find_stream_type(st, stream_type, SCTE_types);