mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 19:21:06 +00:00
gst/gstpad.c: Don't crash when trying to fixate and empty list.
Original commit message from CVS: * gst/gstpad.c: (fixate_value): Don't crash when trying to fixate and empty list. Fixes #506643.
This commit is contained in:
parent
2ef7296544
commit
8951071467
2 changed files with 11 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
2008-01-04 Wim Taymans <wim.taymans@collabora.co.uk>
|
||||
|
||||
* gst/gstpad.c: (fixate_value):
|
||||
Don't crash when trying to fixate and empty list.
|
||||
Fixes #506643.
|
||||
|
||||
2008-01-03 Sebastian Dröge <slomo@circular-chaos.org>
|
||||
|
||||
* docs/faq/gst-uninstalled:
|
||||
|
|
|
@ -2120,7 +2120,12 @@ fixate_value (GValue * dest, const GValue * src)
|
|||
} else if (G_VALUE_TYPE (src) == GST_TYPE_LIST) {
|
||||
GValue temp = { 0 };
|
||||
|
||||
/* list could be empty */
|
||||
if (gst_value_list_get_size (src) <= 0)
|
||||
return FALSE;
|
||||
|
||||
gst_value_init_and_copy (&temp, gst_value_list_get_value (src, 0));
|
||||
|
||||
if (!fixate_value (dest, &temp))
|
||||
gst_value_init_and_copy (dest, &temp);
|
||||
g_value_unset (&temp);
|
||||
|
|
Loading…
Reference in a new issue