diff --git a/gst/mpegtsmux/mpegtsmux.c b/gst/mpegtsmux/mpegtsmux.c index 606e1d7f3a..f59a5f7e3c 100644 --- a/gst/mpegtsmux/mpegtsmux.c +++ b/gst/mpegtsmux/mpegtsmux.c @@ -687,15 +687,13 @@ mpegtsmux_collected (GstCollectPads * pads, MpegTsMux * mux) } if (G_UNLIKELY (prog->pcr_stream == NULL)) { - if (best) { - /* Take the first data stream for the PCR */ - GST_DEBUG_OBJECT (COLLECT_DATA_PAD (best), - "Use stream (pid=%d) from pad as PCR for program (prog_id = %d)", - MPEG_TS_PAD_DATA (best)->pid, MPEG_TS_PAD_DATA (best)->prog_id); + /* Take the first data stream for the PCR */ + GST_DEBUG_OBJECT (COLLECT_DATA_PAD (best), + "Use stream (pid=%d) from pad as PCR for program (prog_id = %d)", + MPEG_TS_PAD_DATA (best)->pid, MPEG_TS_PAD_DATA (best)->prog_id); - /* Set the chosen PCR stream */ - tsmux_program_set_pcr_stream (prog, best->stream); - } + /* Set the chosen PCR stream */ + tsmux_program_set_pcr_stream (prog, best->stream); } g_return_val_if_fail (buf != NULL, GST_FLOW_ERROR);