From 23f4d823e9392259b56fef0231d7ee3103492192 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Minisini?= Date: Sat, 15 Dec 2012 02:07:54 +0000 Subject: [PATCH] [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 --- gb.media/src/c_media.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gb.media/src/c_media.c b/gb.media/src/c_media.c index 3b1dd1869..47f834364 100644 --- a/gb.media/src/c_media.c +++ b/gb.media/src/c_media.c @@ -323,14 +323,18 @@ BEGIN_METHOD(MediaTagList_get, GB_STRING name) value = gst_tag_list_get_value_index(tags, name, 0); type = to_gambas_type(value); if (type == GB_T_NULL) + { + GB.Error("Unsupported property datatype"); return; + } GB.Array.New(&array, type, nvalue); for (i = 0; i < nvalue; i++) { value = gst_tag_list_get_value_index(tags, name, i); 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);