adaptivedemux: Fix leak of pad probes in GstAdaptiveDemuxStream
authorTom Bailey <tom.bailey@youview.com>
Wed, 2 Aug 2017 17:17:08 +0000 (18:17 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Tue, 8 Aug 2017 15:04:42 +0000 (16:04 +0100)
This commit ensures that the idle probe which GstAdaptiveDemuxStream
adds to the upstream source pad is removed after use. Previously a new
probe was added to the pad whenever a fragment was downloaded, meaning
the number of pad probe callbacks being executed increased continually.

https://bugzilla.gnome.org/show_bug.cgi?id=785957

gst-libs/gst/adaptivedemux/gstadaptivedemux.c

index 7b7d1fc527a3cce1ec931bbc7c8619cf92a31a7b..9ee1a764095b75f8083fd2e8dc623d8ba55d0176 100644 (file)
@@ -3081,7 +3081,7 @@ gst_ad_stream_src_to_ready_cb (GstPad * pad, GstPadProbeInfo * info,
   g_cond_signal (&stream->fragment_download_cond);
   g_mutex_unlock (&stream->fragment_download_lock);
 
-  return GST_PAD_PROBE_OK;
+  return GST_PAD_PROBE_REMOVE;
 }
 
 #ifndef GST_DISABLE_GST_DEBUG