summaryrefslogtreecommitdiffstats
path: root/binding
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2017-11-13 13:18:33 -0800
committerMatt Ranostay <matt.ranostay@konsulko.com>2017-11-13 23:00:01 -0800
commitf0e59e782020a315c3b110a2ae2ecec07acc0e57 (patch)
tree2e58e62353b997027dc84c7cfb46389499ed8cb3 /binding
parentadf97a14d996790e22893579ef2004b420283df9 (diff)
binding: mediaplayer: add tag size checkeel_4.99.3eel/4.99.34.99.3
Slight chance to have an infinite tag check for album art data, and this patchset avoids that possibility by checking the max index of tags. Bug-AGL: SPEC-1091 Change-Id: I63836ea6e9795c97cfd0c07231c556bbbb8d9528 Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Diffstat (limited to 'binding')
-rw-r--r--binding/afm-mediaplayer-binding.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/binding/afm-mediaplayer-binding.c b/binding/afm-mediaplayer-binding.c
index ed532a8..9c41f27 100644
--- a/binding/afm-mediaplayer-binding.c
+++ b/binding/afm-mediaplayer-binding.c
@@ -423,9 +423,10 @@ static void controls(struct afb_req request)
static gchar *get_album_art(GstTagList *tags)
{
GstSample *sample = NULL;
+ int num = gst_tag_list_get_tag_size(tags, GST_TAG_IMAGE);
guint i;
- for (i = 0; ; i++) {
+ for (i = 0; i < num ; i++) {
const GValue *value;
GstStructure *caps;
int type;