changeset 2651:38639f62f23f libavformat

associate to each AVProgram the indexes of the AVStreams contained in it
author nicodvb
date Sat, 20 Oct 2007 08:29:05 +0000
parents 4e3d38c8896c
children 2d28b2a5b2e4
files mpegts.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mpegts.c	Sat Oct 20 08:25:13 2007 +0000
+++ b/mpegts.c	Sat Oct 20 08:29:05 2007 +0000
@@ -37,6 +37,7 @@
 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 @@
                     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 */