diff options
Diffstat (limited to 'binding')
-rw-r--r-- | binding/afm-mediaplayer-binding.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/binding/afm-mediaplayer-binding.c b/binding/afm-mediaplayer-binding.c index 960749c..98887c1 100644 --- a/binding/afm-mediaplayer-binding.c +++ b/binding/afm-mediaplayer-binding.c @@ -967,6 +967,10 @@ static void onevent(afb_api_t api, const char *event, struct json_object *object mediaplayer_set_role_state(api, GST_STATE_PAUSED); } else { json_object *jresp = populate_json_metadata(); + + if (!jresp) + jresp = json_object_new_object(); + json_object_object_add(jresp, "status", json_object_new_string("stopped")); afb_event_push(metadata_event, jresp); |