aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2017-10-25 21:59:00 -0700
committerMatt Ranostay <matt.ranostay@konsulko.com>2017-10-25 22:30:08 -0700
commit9273ade2b8783ac39c9cd5dc96d7c45621519a8c (patch)
tree8ed5ccb6ab528b65e4b4ec13cd5e04096d023eb2
parent9f5f0540ee6b0964b545256bab75ac613f2d986b (diff)
binding: mediaplayer: assume play after seek commandeel_4.99.2eel/4.99.24.99.2
Assume to enter playing state when next/previous track commands, and this allows loading of metadata via gstreamer Bug-AGL: SPEC-931 Change-Id: Id7eeb1e354d3c2e7ad63a166b8dbd64afb453332 Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
-rw-r--r--binding/afm-mediaplayer-binding.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/binding/afm-mediaplayer-binding.c b/binding/afm-mediaplayer-binding.c
index 62ccb5e..4ba4e9e 100644
--- a/binding/afm-mediaplayer-binding.c
+++ b/binding/afm-mediaplayer-binding.c
@@ -283,8 +283,8 @@ static int seek_track(int cmd)
if (ret < 0)
return -EINVAL;
- if (data.playing)
- gst_element_set_state(data.playbin, GST_STATE_PLAYING);
+ data.playing = TRUE;
+ gst_element_set_state(data.playbin, GST_STATE_PLAYING);
current_track = item;
@@ -357,6 +357,7 @@ static void controls(struct afb_req request)
list = find_media_index(playlist, idx);
if (list != NULL) {
struct playlist_item *item = list->data;
+ data.playing = TRUE;
set_media_uri(item);
current_track = list;
} else {