mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 07:16:55 +00:00
gst/videomixer/videomixer.c: Use gst_pad_get_parent and drop the ref that was added through that call.
Original commit message from CVS: 2005-10-26 Julien MOUTTE <julien@moutte.net> * gst/videomixer/videomixer.c: (gst_videomixer_pad_set_property), (gst_videomixer_pad_sink_setcaps), (gst_videomixer_getcaps): Use gst_pad_get_parent and drop the ref that was added through that call.
This commit is contained in:
parent
60f30e3083
commit
caa4645ae9
2 changed files with 19 additions and 2 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2005-10-26 Julien MOUTTE <julien@moutte.net>
|
||||||
|
|
||||||
|
* gst/videomixer/videomixer.c: (gst_videomixer_pad_set_property),
|
||||||
|
(gst_videomixer_pad_sink_setcaps), (gst_videomixer_getcaps):
|
||||||
|
Use gst_pad_get_parent and drop the ref that was added through
|
||||||
|
that call.
|
||||||
|
|
||||||
2005-10-26 Thomas Vander Stichele <thomas at apestaart dot org>
|
2005-10-26 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||||
|
|
||||||
* gst/rtp/gstrtpgsmenc.c:
|
* gst/rtp/gstrtpgsmenc.c:
|
||||||
|
|
|
@ -228,6 +228,8 @@ gst_videomixer_pad_set_property (GObject * object, guint prop_id,
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gst_object_unref (mix);
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
|
@ -275,6 +277,7 @@ gst_videomixer_pad_sink_setcaps (GstPad * pad, GstCaps * vscaps)
|
||||||
GstVideoMixerPad *mixpad;
|
GstVideoMixerPad *mixpad;
|
||||||
GstStructure *structure;
|
GstStructure *structure;
|
||||||
gint in_width, in_height;
|
gint in_width, in_height;
|
||||||
|
gboolean ret = FALSE;
|
||||||
|
|
||||||
mix = GST_VIDEO_MIXER (gst_pad_get_parent (pad));
|
mix = GST_VIDEO_MIXER (gst_pad_get_parent (pad));
|
||||||
mixpad = GST_VIDEO_MIXER_PAD (pad);
|
mixpad = GST_VIDEO_MIXER_PAD (pad);
|
||||||
|
@ -287,7 +290,7 @@ gst_videomixer_pad_sink_setcaps (GstPad * pad, GstCaps * vscaps)
|
||||||
|| !gst_structure_get_int (structure, "height", &in_height)
|
|| !gst_structure_get_int (structure, "height", &in_height)
|
||||||
|| !gst_structure_get_double (structure, "framerate",
|
|| !gst_structure_get_double (structure, "framerate",
|
||||||
&mixpad->in_framerate))
|
&mixpad->in_framerate))
|
||||||
return FALSE;
|
goto beach;
|
||||||
|
|
||||||
mixpad->in_width = in_width;
|
mixpad->in_width = in_width;
|
||||||
mixpad->in_height = in_height;
|
mixpad->in_height = in_height;
|
||||||
|
@ -302,7 +305,12 @@ gst_videomixer_pad_sink_setcaps (GstPad * pad, GstCaps * vscaps)
|
||||||
mix->master = mixpad;
|
mix->master = mixpad;
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
ret = TRUE;
|
||||||
|
|
||||||
|
beach:
|
||||||
|
gst_object_unref (mix);
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -523,6 +531,8 @@ gst_videomixer_getcaps (GstPad * pad)
|
||||||
"framerate", G_TYPE_DOUBLE, mix->in_framerate, NULL);
|
"framerate", G_TYPE_DOUBLE, mix->in_framerate, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gst_object_unref (mix);
|
||||||
|
|
||||||
return caps;
|
return caps;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue