mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-11 20:01:35 +00:00
playback/player: android: Unref player in native_free()
This makes sure it is actually shut down and does not emit any signals anymore later, and also prevents a memory leak.
This commit is contained in:
parent
4e899336b3
commit
21eb4b1ac7
1 changed files with 1 additions and 0 deletions
|
@ -224,6 +224,7 @@ native_free (JNIEnv * env, jobject thiz)
|
||||||
if (!player)
|
if (!player)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
g_object_unref (player->player);
|
||||||
(*env)->DeleteGlobalRef (env, player->java_player);
|
(*env)->DeleteGlobalRef (env, player->java_player);
|
||||||
g_free (player);
|
g_free (player);
|
||||||
SET_CUSTOM_DATA (env, thiz, native_player_field_id, NULL);
|
SET_CUSTOM_DATA (env, thiz, native_player_field_id, NULL);
|
||||||
|
|
Loading…
Reference in a new issue