mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-21 06:38:19 +00:00
playback/player: Stop using GSlice for allocations, it's deprecated soon and slower than malloc in most places
This commit is contained in:
parent
8b41422c77
commit
8ba8714b20
1 changed files with 2 additions and 2 deletions
|
@ -196,7 +196,7 @@ on_video_dimensions_changed (GstPlayer * unused, gint width, gint height,
|
||||||
static void
|
static void
|
||||||
native_new (JNIEnv * env, jobject thiz)
|
native_new (JNIEnv * env, jobject thiz)
|
||||||
{
|
{
|
||||||
Player *player = g_slice_new0 (Player);
|
Player *player = g_new0 (Player, 1);
|
||||||
|
|
||||||
player->player = gst_player_new ();
|
player->player = gst_player_new ();
|
||||||
SET_CUSTOM_DATA (env, thiz, native_player_field_id, player);
|
SET_CUSTOM_DATA (env, thiz, native_player_field_id, player);
|
||||||
|
@ -226,7 +226,7 @@ native_free (JNIEnv * env, jobject thiz)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
(*env)->DeleteGlobalRef (env, player->java_player);
|
(*env)->DeleteGlobalRef (env, player->java_player);
|
||||||
g_slice_free (Player, 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