Commit eaf41536 authored by Hyunjun Ko's avatar Hyunjun Ko Committed by Sebastian Dröge
Browse files

meta: transform_func: return FALSE if not supported or failed

https://bugzilla.gnome.org/show_bug.cgi?id=751778
parent ee63702d
......@@ -2331,6 +2331,9 @@ _gst_parent_buffer_meta_transform (GstBuffer * dest, GstMeta * meta,
GST_CAT_DEBUG (gst_parent_buffer_meta_debug,
"copy buffer reference metadata");
} else {
/* return FALSE, if transform type is not supported */
return FALSE;
}
return TRUE;
}
......
......@@ -44,10 +44,13 @@ static gboolean
net_address_meta_transform (GstBuffer * transbuf, GstMeta * meta,
GstBuffer * buffer, GQuark type, gpointer data)
{
GstNetAddressMeta *nmeta = (GstNetAddressMeta *) meta;
GstNetAddressMeta *smeta, *dmeta;
smeta = (GstNetAddressMeta *) meta;
/* we always copy no matter what transform */
gst_buffer_add_net_address_meta (transbuf, nmeta->addr);
dmeta = gst_buffer_add_net_address_meta (transbuf, smeta->addr);
if (!dmeta)
return FALSE;
return TRUE;
}
......
......@@ -47,10 +47,13 @@ static gboolean
net_control_message_meta_transform (GstBuffer * transbuf, GstMeta * meta,
GstBuffer * buffer, GQuark type, gpointer data)
{
GstNetControlMessageMeta *nmeta = (GstNetControlMessageMeta *) meta;
GstNetControlMessageMeta *smeta, *dmeta;
smeta = (GstNetControlMessageMeta *) meta;
/* we always copy no matter what transform */
gst_buffer_add_net_control_message_meta (transbuf, nmeta->message);
dmeta = gst_buffer_add_net_control_message_meta (transbuf, smeta->message);
if (!dmeta)
return FALSE;
return TRUE;
}
......
......@@ -117,6 +117,9 @@ test_transform_func (GstBuffer * transbuf, GstMeta * meta,
test->duration = -1;
}
test->clock_rate = tmeta->clock_rate;
} else {
/* return FALSE, if transform type is not supported */
return FALSE;
}
return TRUE;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment