mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +00:00
taglist: add warning when we get something else than a sample for a sample tag
Facilitate GstBuffer -> GstSample transition for some tags, could be hard to catch otherwise when creating tags, since it'll only be apparent later when someone tries to read the tags.
This commit is contained in:
parent
0bc87ee5d9
commit
c2a25bcd0f
1 changed files with 7 additions and 1 deletions
|
@ -1261,7 +1261,13 @@ gst_tag_list_add_valist (GstTagList * list, GstTagMergeMode mode,
|
|||
*/
|
||||
return;
|
||||
}
|
||||
gst_tag_list_add_value_internal (list, mode, tag, &value, info);
|
||||
/* Facilitate GstBuffer -> GstSample transition */
|
||||
if (G_UNLIKELY (info->type == GST_TYPE_SAMPLE &&
|
||||
!GST_IS_SAMPLE (value.data[0].v_pointer))) {
|
||||
g_warning ("Expected GstSample argument for tag '%s'", tag);
|
||||
} else {
|
||||
gst_tag_list_add_value_internal (list, mode, tag, &value, info);
|
||||
}
|
||||
g_value_unset (&value);
|
||||
tag = va_arg (var_args, gchar *);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue