mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
ges: Allow passing NULL
as a value to ges_meta_container_set_meta
Fixes T7430
This commit is contained in:
parent
1b44d177fb
commit
9d65519411
1 changed files with 8 additions and 1 deletions
|
@ -402,7 +402,7 @@ CREATE_SETTER (string, const gchar *, G_TYPE_STRING, string)
|
|||
* ges_meta_container_set_meta:
|
||||
* @container: Target container
|
||||
* @meta_item: Name of the meta item to set
|
||||
* @value: Value to set
|
||||
* @value: (allow-none): Value to set
|
||||
* Sets the value of a given meta item
|
||||
*
|
||||
* Return: %TRUE if the meta could be added, %FALSE otherwize
|
||||
|
@ -414,6 +414,13 @@ ges_meta_container_set_meta (GESMetaContainer * container,
|
|||
g_return_val_if_fail (GES_IS_META_CONTAINER (container), FALSE);
|
||||
g_return_val_if_fail (meta_item != NULL, FALSE);
|
||||
|
||||
if (value == NULL) {
|
||||
GstStructure *structure = _meta_container_get_structure (container);
|
||||
gst_structure_remove_field (structure, meta_item);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (_can_write_value (container, meta_item, G_VALUE_TYPE (value)) == FALSE)
|
||||
return FALSE;
|
||||
|
||||
|
|
Loading…
Reference in a new issue