diff options
author | Nico Sabbi <nicola.sabbi@poste.it> | 2007-10-20 08:29:05 +0000 |
---|---|---|
committer | Nico Sabbi <nicola.sabbi@poste.it> | 2007-10-20 08:29:05 +0000 |
commit | aa237f45354799cdc34bdb06759e560dab3a0532 (patch) | |
tree | 447bcda8e42a38f75a985322fd888b7abbed046a | |
parent | 526efa105349fbae87b0d0afcd9825575524e985 (diff) | |
download | ffmpeg-aa237f45354799cdc34bdb06759e560dab3a0532.tar.gz |
associate to each AVProgram the indexes of the AVStreams contained in it
Originally committed as revision 10820 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/mpegts.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index 825eadc779..9554c5acfd 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -37,6 +37,7 @@ typedef struct PESContext PESContext; static PESContext* add_pes_stream(MpegTSContext *ts, int pid, int pcr_pid, int stream_type); static AVStream* new_pes_av_stream(PESContext *pes, uint32_t code); extern void av_set_program_name(AVProgram *program, char *provider_name, char *name); +extern void av_program_add_stream_index(AVFormatContext *ac, int progid, unsigned int idx); enum MpegTSFilterType { MPEGTS_PES, @@ -597,6 +598,8 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len st = new_pes_av_stream(pes, 0); } add_pid_to_pmt(ts, h->id, pid); + if(st) + av_program_add_stream_index(ts->stream, h->id, st->index); break; default: /* we ignore the other streams */ |