gst/videoscale/gstvideoscale.c: Don't leak reference to pad parent.

Original commit message from CVS:
* gst/videoscale/gstvideoscale.c:
(gst_videoscale_handle_src_event):
Don't leak reference to pad parent.
This commit is contained in:
Tim-Philipp Müller 2005-11-16 12:23:02 +00:00
parent 8360581332
commit 0f873a9ab4
2 changed files with 18 additions and 4 deletions

View file

@ -1,3 +1,9 @@
2005-11-16 Tim-Philipp Müller <tim at centricular dot net>
* gst/videoscale/gstvideoscale.c:
(gst_videoscale_handle_src_event):
Don't leak reference to pad parent.
2005-11-16 Wim Taymans <wim@fluendo.com>
* gst-libs/gst/audio/gstringbuffer.c: (gst_ring_buffer_stop):

View file

@ -602,11 +602,15 @@ static gboolean
gst_videoscale_handle_src_event (GstPad * pad, GstEvent * event)
{
GstVideoscale *videoscale;
gboolean ret;
double a;
GstStructure *structure;
videoscale = GST_VIDEOSCALE (gst_pad_get_parent (pad));
GST_DEBUG_OBJECT (videoscale, "handling %s event",
GST_EVENT_TYPE_NAME (event));
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_NAVIGATION:
event =
@ -621,12 +625,16 @@ gst_videoscale_handle_src_event (GstPad * pad, GstEvent * event)
gst_structure_set (structure, "pointer_y", G_TYPE_DOUBLE,
a * videoscale->from_height / videoscale->to_height, NULL);
}
return gst_pad_event_default (pad, event);
break;
default:
GST_DEBUG_OBJECT (videoscale, "passing on non-NAVIGATION event %p",
event);
return gst_pad_event_default (pad, event);
break;
}
ret = gst_pad_event_default (pad, event);
gst_object_unref (videoscale);
return ret;
}
static gboolean