mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
value: fix crash serialising a 0 flags value when there's no name for it
Fixes segfault when doing gst-launch-1.0 -v -m camerabin (encodebin notifies a 0 value for its "flag" property). https://bugzilla.gnome.org/show_bug.cgi?id=682958
This commit is contained in:
parent
985bc911a2
commit
7bf7749c2b
1 changed files with 4 additions and 1 deletions
|
@ -2847,7 +2847,10 @@ gst_value_serialize_flags (const GValue * value)
|
|||
/* if no flags are set, try to serialize to the _NONE string */
|
||||
if (!flags) {
|
||||
fl = g_flags_get_first_value (klass, flags);
|
||||
if (fl)
|
||||
return g_strdup (fl->value_name);
|
||||
else
|
||||
return g_strdup ("0");
|
||||
}
|
||||
|
||||
/* some flags are set, so serialize one by one */
|
||||
|
|
Loading…
Reference in a new issue