Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mpegts-mythtv.c: pmt_cb(): harmonize part 3
update_av_program_info() is set_pcr_pid() but also sets AVProgram.pmt_version = version and has some logging. add_pid_to_pmt() is equivalent to add_pid_to_program() using get_program() except add_pid_to_program() scans all the pids to ensure no duplicates. static void add_pid_to_pmt(MpegTSContext *ts, unsigned int programid, unsigned int pid) { struct Program *p = get_program(ts, programid); add_pid_to_program(p, pid); } clear_program() using get_program() resets nb_pids, nb_streams, and pmt_found. clear_program_pid() just resets nb_pids: static void clear_program_pid(MpegTSContext *ts, unsigned int programid) { struct Program *p = get_program(ts, programid); if (p) p->nb_pids = 0; } Thus, AVProgram.pmt_version is now set, and prg now has two pids: ts->current_pid (new) and pcr_pid. prg now also has nb_streams and pmt_found reset to 0.
- Loading branch information