gst/gstpad.c: GST_RPAD_* will only operate on a RealPad (it casts the pointer, it doesn't actually check the contents...

Original commit message from CVS:
* gst/gstpad.c: (gst_pad_is_negotiated),
(gst_pad_get_negotiated_caps):
GST_RPAD_* will only operate on a RealPad (it casts the pointer,
it doesn't actually check the contents), so be sure to hand it
a RealPad else we'll crash.
This commit is contained in:
Ronald S. Bultje 2004-12-03 13:24:15 +00:00
parent d6e66eee73
commit 8291c44aa1
2 changed files with 10 additions and 2 deletions

View file

@ -1,3 +1,11 @@
2004-12-03 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* gst/gstpad.c: (gst_pad_is_negotiated),
(gst_pad_get_negotiated_caps):
GST_RPAD_* will only operate on a RealPad (it casts the pointer,
it doesn't actually check the contents), so be sure to hand it
a RealPad else we'll crash.
2004-12-03 Wim Taymans <wim@fluendo.com>
* gst/gstqueue.c: (gst_queue_init), (gst_queue_getcaps),

View file

@ -2597,7 +2597,7 @@ gst_pad_is_negotiated (GstPad * pad)
{
g_return_val_if_fail (GST_IS_PAD (pad), FALSE);
if (!GST_PAD_REALIZE (pad))
if (!(pad = (GstPad *) GST_PAD_REALIZE (pad)))
return FALSE;
if (!GST_RPAD_LINK (pad))
return FALSE;
@ -2619,7 +2619,7 @@ gst_pad_get_negotiated_caps (GstPad * pad)
{
g_return_val_if_fail (GST_IS_PAD (pad), NULL);
if (!GST_PAD_REALIZE (pad))
if (!(pad = (GstPad *) GST_PAD_REALIZE (pad)))
return NULL;
if (!GST_RPAD_LINK (pad))
return NULL;