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:
Sebastian Dröge 2015-05-11 09:23:27 +02:00
parent 4e899336b3
commit 21eb4b1ac7

View file

@ -224,6 +224,7 @@ native_free (JNIEnv * env, jobject thiz)
if (!player)
return;
g_object_unref (player->player);
(*env)->DeleteGlobalRef (env, player->java_player);
g_free (player);
SET_CUSTOM_DATA (env, thiz, native_player_field_id, NULL);