aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/mpegts.c
diff options
context:
space:
mode:
authorKieran Kunhya <kieran@kunhya.com>2011-03-04 19:22:09 +0000
committerMichael Niedermayer <michaelni@gmx.at>2011-05-28 04:11:26 +0200
commit24adef142f4901abf7e92e79d20b79f332d5c54f (patch)
treed8dae9b379259bafe7ce5be5cce868028eff68c2 /libavformat/mpegts.c
parentfa12fb3b00cb4e08a38a4fb192293347c218b3d3 (diff)
downloadffmpeg-24adef142f4901abf7e92e79d20b79f332d5c54f.tar.gz
Export more transport stream information.
with minor addition to the comment by michael
Diffstat (limited to 'libavformat/mpegts.c')
-rw-r--r--libavformat/mpegts.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 9511ede08d..b5f25aa40d 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -1137,6 +1137,7 @@ static void pat_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
SectionHeader h1, *h = &h1;
const uint8_t *p, *p_end;
int sid, pmt_pid;
+ AVProgram *program;
#ifdef DEBUG
av_dlog(ts->stream, "PAT:\n");
@@ -1149,6 +1150,8 @@ static void pat_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
if (h->tid != PAT_TID)
return;
+ ts->stream->ts_id = h->id;
+
clear_programs(ts);
for(;;) {
sid = get16(&p, p_end);
@@ -1163,7 +1166,9 @@ static void pat_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
if (sid == 0x0000) {
/* NIT info */
} else {
- av_new_program(ts->stream, sid);
+ program = av_new_program(ts->stream, sid);
+ program->program_num = sid;
+ program->pmt_pid = pmt_pid;
if (ts->pids[pmt_pid])
mpegts_close_filter(ts, ts->pids[pmt_pid]);
mpegts_open_section_filter(ts, pmt_pid, pmt_cb, ts, 1);