mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
basetsmux: fix PCR stream selection
This commit is contained in:
parent
1ff72bb69d
commit
52efb62876
1 changed files with 9 additions and 7 deletions
|
@ -685,13 +685,6 @@ gst_base_ts_mux_create_streams (GstBaseTsMux * mux)
|
|||
tsmux_set_pmt_interval (ts_pad->prog, mux->pmt_interval);
|
||||
g_hash_table_insert (mux->programs,
|
||||
GINT_TO_POINTER (ts_pad->prog_id), ts_pad->prog);
|
||||
|
||||
/* Take the first stream of the program for the PCR */
|
||||
GST_DEBUG_OBJECT (ts_pad,
|
||||
"Use stream (pid=%d) from pad as PCR for program (prog_id = %d)",
|
||||
ts_pad->pid, ts_pad->prog_id);
|
||||
|
||||
tsmux_program_set_pcr_stream (ts_pad->prog, ts_pad->stream);
|
||||
}
|
||||
|
||||
if (ts_pad->stream == NULL) {
|
||||
|
@ -700,6 +693,15 @@ gst_base_ts_mux_create_streams (GstBaseTsMux * mux)
|
|||
goto no_stream;
|
||||
}
|
||||
|
||||
if (ts_pad->prog->pcr_stream == NULL) {
|
||||
/* Take the first stream of the program for the PCR */
|
||||
GST_DEBUG_OBJECT (ts_pad,
|
||||
"Use stream (pid=%d) from pad as PCR for program (prog_id = %d)",
|
||||
ts_pad->pid, ts_pad->prog_id);
|
||||
|
||||
tsmux_program_set_pcr_stream (ts_pad->prog, ts_pad->stream);
|
||||
}
|
||||
|
||||
/* Check for user-specified PCR PID */
|
||||
pcr_name = g_strdup_printf ("PCR_%d", ts_pad->prog->pgm_number);
|
||||
if (mux->prog_map && gst_structure_has_field (mux->prog_map, pcr_name)) {
|
||||
|
|
Loading…
Reference in a new issue