From fa6d174455e51b918946a8c9f5930d10b71996d0 Mon Sep 17 00:00:00 2001 From: Alessandro Decina Date: Sat, 20 Aug 2011 00:48:20 +0200 Subject: [PATCH] tsmux: remove unnecessary check remove an if (best) check where best != NULL has already been checked --- gst/mpegtsmux/mpegtsmux.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) 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);