mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-13 12:51:16 +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
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue