Commit 0080630b authored by Thomas Vander Stichele's avatar Thomas Vander Stichele
Browse files

unref data when probe function returns FALSE. Fixes #166362

Original commit message from CVS:
unref data when probe function returns FALSE.  Fixes #166362
parent 01a7744a
2005-02-07 Thomas Vander Stichele <thomas at apestaart dot org>
patch by: Tim Philipp-Müller
* configure.ac:
* gst/gstpad.c:
unref data when probe function returns FALSE. Fixes #166362
2005-02-06 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* gst/gst.c: (gst_init_get_popt_table):
......
......@@ -3,7 +3,7 @@ AC_CANONICAL_TARGET
dnl when going to/from release please set the nano (fourth number) right !
dnl releases only do Wall, cvs and prerelease does Werror too
AS_VERSION(gstreamer, GST_VERSION, 0, 8, 8, 1, GST_CVS="no", GST_CVS="yes")
AS_VERSION(gstreamer, GST_VERSION, 0, 8, 8, 2, GST_CVS="no", GST_CVS="yes")
dnl AM_MAINTAINER_MODE only provides the option to configure to enable it
AM_MAINTAINER_MODE
......
......@@ -3247,8 +3247,13 @@ gst_pad_push (GstPad * pad, GstData * data)
g_return_if_fail (data != NULL);
DEBUG_DATA (pad, data, "gst_pad_push");
if (!gst_probe_dispatcher_dispatch (&(GST_REAL_PAD (pad)->probedisp), &data))
if (!gst_probe_dispatcher_dispatch (&(GST_REAL_PAD (pad)->probedisp), &data)) {
GST_CAT_LOG_OBJECT (GST_CAT_SCHEDULING, pad,
"not pushing data %p, blocked by probe", data);
gst_data_unref (data);
return;
}
if (!GST_PAD_IS_LINKED (pad)) {
GST_CAT_LOG_OBJECT (GST_CAT_SCHEDULING, pad,
......@@ -3279,13 +3284,17 @@ gst_pad_push (GstPad * pad, GstData * data)
if (peer->chainhandler) {
if (data) {
if (!gst_probe_dispatcher_dispatch (&peer->probedisp, &data)) {
GST_CAT_LOG_OBJECT (GST_CAT_SCHEDULING, pad,
"not pushing data %p, blocked by probe", data);
gst_data_unref (data);
return;
}
GST_CAT_LOG_OBJECT (GST_CAT_SCHEDULING, pad,
"calling chainhandler &%s of peer pad %s:%s",
GST_DEBUG_FUNCPTR_NAME (peer->chainhandler),
GST_DEBUG_PAD_NAME (GST_PAD (peer)));
if (!gst_probe_dispatcher_dispatch (&peer->probedisp, &data))
return;
(peer->chainhandler) (GST_PAD (peer), data);
return;
} else {
......@@ -3368,8 +3377,12 @@ gst_pad_pull (GstPad * pad)
}
}
GST_DEBUG ("calling gst_probe_dispatcher_dispatch on data %p", data);
if (!gst_probe_dispatcher_dispatch (&peer->probedisp, &data))
if (!gst_probe_dispatcher_dispatch (&peer->probedisp, &data)) {
GST_CAT_LOG_OBJECT (GST_CAT_SCHEDULING, pad,
"not returning pulled data %p, blocked by probe", data);
gst_data_unref (data);
goto restart;
}
DEBUG_DATA (pad, data, "gst_pad_pull returned");
return data;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment