summaryrefslogtreecommitdiffstats
path: root/binding/afm-mediaplayer-binding.c
diff options
context:
space:
mode:
Diffstat (limited to 'binding/afm-mediaplayer-binding.c')
-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) {