Browse Source

associate to each AVProgram the indexes of the AVStreams contained in it

Originally committed as revision 10820 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Nico Sabbi 18 years ago
parent
commit
aa237f4535
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      libavformat/mpegts.c

+ 3
- 0
libavformat/mpegts.c View File

@@ -37,6 +37,7 @@ typedef struct PESContext PESContext;
static PESContext* add_pes_stream(MpegTSContext *ts, int pid, int pcr_pid, int stream_type); 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); 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_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 { enum MpegTSFilterType {
MPEGTS_PES, 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); st = new_pes_av_stream(pes, 0);
} }
add_pid_to_pmt(ts, h->id, pid); add_pid_to_pmt(ts, h->id, pid);
if(st)
av_program_add_stream_index(ts->stream, h->id, st->index);
break; break;
default: default:
/* we ignore the other streams */ /* we ignore the other streams */


Loading…
Cancel
Save