[GB.MEDIA]
* BUG: Fix retrieving of media tags that are arrays of values. git-svn-id: svn://localhost/gambas/trunk@5436 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
acbd6bd8a1
commit
23f4d823e9
@ -323,14 +323,18 @@ BEGIN_METHOD(MediaTagList_get, GB_STRING name)
|
|||||||
value = gst_tag_list_get_value_index(tags, name, 0);
|
value = gst_tag_list_get_value_index(tags, name, 0);
|
||||||
type = to_gambas_type(value);
|
type = to_gambas_type(value);
|
||||||
if (type == GB_T_NULL)
|
if (type == GB_T_NULL)
|
||||||
|
{
|
||||||
|
GB.Error("Unsupported property datatype");
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
GB.Array.New(&array, type, nvalue);
|
GB.Array.New(&array, type, nvalue);
|
||||||
for (i = 0; i < nvalue; i++)
|
for (i = 0; i < nvalue; i++)
|
||||||
{
|
{
|
||||||
value = gst_tag_list_get_value_index(tags, name, i);
|
value = gst_tag_list_get_value_index(tags, name, i);
|
||||||
to_gambas_value(value, &gvalue);
|
to_gambas_value(value, &gvalue);
|
||||||
GB.Store(type, GB.Array.Get(array, i), &gvalue);
|
GB.Store(type, &gvalue, GB.Array.Get(array, i));
|
||||||
|
GB.ReleaseValue(&gvalue);
|
||||||
}
|
}
|
||||||
|
|
||||||
GB.ReturnObject(array);
|
GB.ReturnObject(array);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user