summaryrefslogtreecommitdiffstats
path: root/binding
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2020-03-04 13:41:29 -0800
committerMatt Ranostay <matt.ranostay@konsulko.com>2020-03-04 21:48:22 +0000
commitd35a6986f5729b795e510fa30035b9e6fec74eb1 (patch)
treec763bd4ca513670e5d5d9646a2cfa621b15cef3a /binding
parent41594375cad6847da774cd13c178fb8251790042 (diff)
Using Mediaplayer UI it is possible to send multiple play events before the Pause button is displayed. This seems to cause unexpected side effects on playback. Bug-AGL: SPEC-3197 Change-Id: Iad6b0998e8bcc1331cb78d8f45081d0e6185913a Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Diffstat (limited to 'binding')
-rw-r--r--binding/afm-mediaplayer-binding.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/binding/afm-mediaplayer-binding.c b/binding/afm-mediaplayer-binding.c
index 2a66afb..5f66196 100644
--- a/binding/afm-mediaplayer-binding.c
+++ b/binding/afm-mediaplayer-binding.c
@@ -453,6 +453,12 @@ static void gstreamer_controls(afb_req_t request)
switch (cmd) {
case PLAY_CMD: {
GstElement *obj = NULL;
+
+ if (data.playing) {
+ afb_req_fail(request, "failed", "Already playing");
+ return;
+ }
+
g_object_get(data.playbin, "audio-sink", &obj, NULL);
if (obj == data.fake_sink) {