From 8ba8714b20a5f53af34417d2990db7ce8505ed0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 6 Mar 2015 09:38:16 +0100 Subject: [PATCH] playback/player: Stop using GSlice for allocations, it's deprecated soon and slower than malloc in most places --- playback/player/android/jni/player.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/playback/player/android/jni/player.c b/playback/player/android/jni/player.c index 2597db447f..577fab9d3b 100644 --- a/playback/player/android/jni/player.c +++ b/playback/player/android/jni/player.c @@ -196,7 +196,7 @@ on_video_dimensions_changed (GstPlayer * unused, gint width, gint height, static void native_new (JNIEnv * env, jobject thiz) { - Player *player = g_slice_new0 (Player); + Player *player = g_new0 (Player, 1); player->player = gst_player_new (); SET_CUSTOM_DATA (env, thiz, native_player_field_id, player); @@ -226,7 +226,7 @@ native_free (JNIEnv * env, jobject thiz) return; (*env)->DeleteGlobalRef (env, player->java_player); - g_slice_free (Player, player); + g_free (player); SET_CUSTOM_DATA (env, thiz, native_player_field_id, NULL); }