mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 15:51:11 +00:00
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:
parent
8360581332
commit
0f873a9ab4
2 changed files with 18 additions and 4 deletions
|
@ -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):
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue