From 1b842833967ac0c362baad6672f7425013c8c9d3 Mon Sep 17 00:00:00 2001 From: Stefan Sauer Date: Thu, 5 Oct 2017 17:54:34 +0200 Subject: [PATCH] audioaggregator: remove buffer!=NULL check Acording to the logic this cannot happen (we already check this before). So add a assert like we do above and remove the check. This make it clearer that we check for the offset range. Also remove a dead assignment since we reassign this a few lines below. --- gst-libs/gst/audio/gstaudioaggregator.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gst-libs/gst/audio/gstaudioaggregator.c b/gst-libs/gst/audio/gstaudioaggregator.c index fab852d..3447d08 100644 --- a/gst-libs/gst/audio/gstaudioaggregator.c +++ b/gst-libs/gst/audio/gstaudioaggregator.c @@ -1287,11 +1287,11 @@ gst_audio_aggregator_aggregate (GstAggregator * agg, gboolean timeout) } } + g_assert (pad->priv->buffer); if (pad->priv->output_offset >= aagg->priv->offset - && pad->priv->output_offset < - aagg->priv->offset + blocksize && pad->priv->buffer) { - gboolean drop_buf = FALSE; + && pad->priv->output_offset < aagg->priv->offset + blocksize) { + gboolean drop_buf; GST_LOG_OBJECT (aggpad, "Mixing buffer for current offset"); drop_buf = !gst_audio_aggregator_mix_buffer (aagg, pad, pad->priv->buffer, -- 2.7.4