From 9d787aa498eec587c4b119eed025f3ff8ea7932d Mon Sep 17 00:00:00 2001 From: hanqiyuan Date: Thu, 31 Oct 2024 20:01:18 +0800 Subject: [PATCH] framework/media: skip onplay cb when already closed --- client/media_uv_graph.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/client/media_uv_graph.c b/client/media_uv_graph.c index 0099f2e..87a0501 100644 --- a/client/media_uv_graph.c +++ b/client/media_uv_graph.c @@ -647,7 +647,7 @@ static void media_uv_player_suggest_cb(int suggest, void* cookie) if (!player) { MEDIA_INFO("suggest:%d canceled\n", suggest); - goto out; + return; } MEDIA_INFO("%s:%p suggest:%d\n", player->name, player, suggest); @@ -685,7 +685,6 @@ static void media_uv_player_suggest_cb(int suggest, void* cookie) break; } -out: if (priv->on_play) { if (!suggest_active) /* Notify user if focus request failed. */ priv->on_play(priv->on_play_cookie, -EPERM); @@ -1025,7 +1024,7 @@ static void media_uv_recorder_suggest_cb(int suggest, void* cookie) if (!recorder) { MEDIA_INFO("suggest:%d canceled\n", suggest); - goto out; + return; } MEDIA_INFO("%s:%p suggest:%d\n", recorder->name, recorder, suggest); @@ -1052,7 +1051,6 @@ static void media_uv_recorder_suggest_cb(int suggest, void* cookie) break; } -out: if (priv->on_play) { if (!suggest_active) /* Notify user if focus request failed. */ priv->on_play(priv->on_play_cookie, -EPERM);