mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 05:31:15 +00:00
meta: transform_func: return FALSE if not supported or failed
https://bugzilla.gnome.org/show_bug.cgi?id=751778
This commit is contained in:
parent
ee63702d61
commit
eaf4153668
4 changed files with 16 additions and 4 deletions
|
@ -2331,6 +2331,9 @@ _gst_parent_buffer_meta_transform (GstBuffer * dest, GstMeta * meta,
|
||||||
|
|
||||||
GST_CAT_DEBUG (gst_parent_buffer_meta_debug,
|
GST_CAT_DEBUG (gst_parent_buffer_meta_debug,
|
||||||
"copy buffer reference metadata");
|
"copy buffer reference metadata");
|
||||||
|
} else {
|
||||||
|
/* return FALSE, if transform type is not supported */
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,10 +44,13 @@ static gboolean
|
||||||
net_address_meta_transform (GstBuffer * transbuf, GstMeta * meta,
|
net_address_meta_transform (GstBuffer * transbuf, GstMeta * meta,
|
||||||
GstBuffer * buffer, GQuark type, gpointer data)
|
GstBuffer * buffer, GQuark type, gpointer data)
|
||||||
{
|
{
|
||||||
GstNetAddressMeta *nmeta = (GstNetAddressMeta *) meta;
|
GstNetAddressMeta *smeta, *dmeta;
|
||||||
|
smeta = (GstNetAddressMeta *) meta;
|
||||||
|
|
||||||
/* we always copy no matter what transform */
|
/* 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;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,10 +47,13 @@ static gboolean
|
||||||
net_control_message_meta_transform (GstBuffer * transbuf, GstMeta * meta,
|
net_control_message_meta_transform (GstBuffer * transbuf, GstMeta * meta,
|
||||||
GstBuffer * buffer, GQuark type, gpointer data)
|
GstBuffer * buffer, GQuark type, gpointer data)
|
||||||
{
|
{
|
||||||
GstNetControlMessageMeta *nmeta = (GstNetControlMessageMeta *) meta;
|
GstNetControlMessageMeta *smeta, *dmeta;
|
||||||
|
smeta = (GstNetControlMessageMeta *) meta;
|
||||||
|
|
||||||
/* we always copy no matter what transform */
|
/* 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;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -117,6 +117,9 @@ test_transform_func (GstBuffer * transbuf, GstMeta * meta,
|
||||||
test->duration = -1;
|
test->duration = -1;
|
||||||
}
|
}
|
||||||
test->clock_rate = tmeta->clock_rate;
|
test->clock_rate = tmeta->clock_rate;
|
||||||
|
} else {
|
||||||
|
/* return FALSE, if transform type is not supported */
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue