Use pcr pid from streaming_start in case it changes during muxing

This commit is contained in:
John Törnblom 2012-09-06 12:09:00 +02:00
parent 5089291789
commit 8126f2a1b8

View file

@ -53,7 +53,6 @@ typedef struct pass_muxer {
uint8_t *pm_pat;
uint8_t *pm_pmt;
uint16_t pm_pmt_pid;
uint16_t pm_pcr_pid;
uint32_t pm_ic; // Injection counter
uint32_t pm_pc; // Packet counter
} pass_muxer_t;
@ -120,7 +119,7 @@ pass_muxer_init(muxer_t* m, const struct streaming_start *ss, const char *name)
pm->pm_pmt[2] = 0x00 | (pm->pm_pmt_pid >> 0);
pm->pm_pmt[3] = 0x10;
pm->pm_pmt[4] = 0x00;
if(psi_build_pmt(ss, pm->pm_pmt+5, 183, pm->pm_pcr_pid) < 0) {
if(psi_build_pmt(ss, pm->pm_pmt+5, 183, ss->ss_pcr_pid) < 0) {
pm->m_errors++;
tvhlog(LOG_ERR, "pass", "%s: Unable to build pmt", pm->pm_filename);
return -1;
@ -324,7 +323,6 @@ pass_muxer_create(service_t *s, muxer_container_type_t mc)
} else {
pm->m_container = MC_MPEGTS;
pm->pm_pmt_pid = s->s_pmt_pid;
pm->pm_pcr_pid = s->s_pcr_pid;
pm->pm_pat = malloc(188);
pm->pm_pmt = malloc(188);
pm->pm_buf = malloc(188 * TS_BUFFER_COUNT);