Remember what pids the streams originally comes from.
This commit is contained in:
parent
d2a36cb39e
commit
1f69b827c9
3 changed files with 5 additions and 5 deletions
|
@ -687,7 +687,7 @@ psi_parse_pmt(th_transport_t *t, const uint8_t *ptr, int len, int chksvcid,
|
|||
int
|
||||
psi_build_pmt(streaming_start_t *ss, uint8_t *buf0, int maxlen, int pcrpid)
|
||||
{
|
||||
int c, tlen, dlen, l, i, pid;
|
||||
int c, tlen, dlen, l, i;
|
||||
uint8_t *buf, *buf1;
|
||||
|
||||
buf = buf0;
|
||||
|
@ -716,8 +716,6 @@ psi_build_pmt(streaming_start_t *ss, uint8_t *buf0, int maxlen, int pcrpid)
|
|||
for(i = 0; i < ss->ss_num_components; i++) {
|
||||
streaming_start_component_t *ssc = &ss->ss_components[i];
|
||||
|
||||
pid = 200 + i;
|
||||
|
||||
switch(ssc->ssc_type) {
|
||||
case SCT_MPEG2VIDEO:
|
||||
c = 0x02;
|
||||
|
@ -741,8 +739,8 @@ psi_build_pmt(streaming_start_t *ss, uint8_t *buf0, int maxlen, int pcrpid)
|
|||
|
||||
|
||||
buf[0] = c;
|
||||
buf[1] = 0xe0 | (pid >> 8);
|
||||
buf[2] = pid;
|
||||
buf[1] = 0xe0 | (ssc->ssc_pid >> 8);
|
||||
buf[2] = ssc->ssc_pid;
|
||||
|
||||
buf1 = &buf[3];
|
||||
tlen += 5;
|
||||
|
|
|
@ -30,6 +30,7 @@ typedef struct streaming_start_component {
|
|||
char ssc_lang[4];
|
||||
uint16_t ssc_composition_id;
|
||||
uint16_t ssc_ancillary_id;
|
||||
uint16_t ssc_pid;
|
||||
int16_t ssc_width;
|
||||
int16_t ssc_height;
|
||||
uint8_t ssc_sri;
|
||||
|
|
|
@ -805,6 +805,7 @@ transport_build_stream_start(th_transport_t *t)
|
|||
memcpy(ssc->ssc_lang, st->st_lang, 4);
|
||||
ssc->ssc_composition_id = st->st_composition_id;
|
||||
ssc->ssc_ancillary_id = st->st_ancillary_id;
|
||||
ssc->ssc_pid = st->st_pid;
|
||||
ssc->ssc_width = st->st_width;
|
||||
ssc->ssc_height = st->st_height;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue