diff options
author | Matt Ranostay <matt.ranostay@konsulko.com> | 2020-03-04 13:41:29 -0800 |
---|---|---|
committer | Matt Ranostay <matt.ranostay@konsulko.com> | 2020-03-04 21:48:22 +0000 |
commit | d35a6986f5729b795e510fa30035b9e6fec74eb1 (patch) | |
tree | c763bd4ca513670e5d5d9646a2cfa621b15cef3a | |
parent | 41594375cad6847da774cd13c178fb8251790042 (diff) |
mediaplayer: don't execute PLAY_CMD if already playingicefish_9.0.4icefish_9.0.3icefish_9.0.2icefish_9.0.1icefish/9.0.4icefish/9.0.3icefish/9.0.2icefish/9.0.19.0.49.0.39.0.29.0.1icefish
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>
-rw-r--r-- | binding/afm-mediaplayer-binding.c | 6 |
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) { |