summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Hervey <edward@centricular.com>2017-12-20 15:02:30 +0100
committerEdward Hervey <bilboed@bilboed.com>2017-12-20 15:03:44 +0100
commit12f8410cd20eaa4e1da1674d20c0a5ac5fc37488 (patch)
tree3f66be10826d3c1db9dbd46ff1df5a99c8b60c2f
parent26cd1f108e2a1e250f38d6d900f321b545d598fd (diff)
audioaggregator: Don't leak pads
all audioaggregator subclasses were leaking the first sink pad :)
-rw-r--r--gst-libs/gst/audio/gstaudioaggregator.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gst-libs/gst/audio/gstaudioaggregator.c b/gst-libs/gst/audio/gstaudioaggregator.c
index 8772ae86f..d749b9b7c 100644
--- a/gst-libs/gst/audio/gstaudioaggregator.c
+++ b/gst-libs/gst/audio/gstaudioaggregator.c
@@ -743,7 +743,6 @@ gst_audio_aggregator_sink_setcaps (GstAudioAggregatorPad * aaggpad,
&& info.rate != downstream_rate) || (first_configured_pad
&& info.rate != first_configured_pad->info.rate)) {
gst_pad_push_event (GST_PAD (aaggpad), gst_event_new_reconfigure ());
- gst_object_unref (first_configured_pad);
ret = FALSE;
} else {
GST_OBJECT_LOCK (aaggpad);
@@ -755,6 +754,9 @@ gst_audio_aggregator_sink_setcaps (GstAudioAggregatorPad * aaggpad,
}
done:
+ if (first_configured_pad)
+ gst_object_unref (first_configured_pad);
+
if (downstream_caps)
gst_caps_unref (downstream_caps);