mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-20 14:18:34 +00:00
vpx: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
This commit is contained in:
parent
9ab2541266
commit
2a3513ef6c
3 changed files with 6 additions and 6 deletions
|
@ -89,11 +89,11 @@ static void
|
||||||
gst_vp8_enc_user_data_free (GstVP8EncUserData * user_data)
|
gst_vp8_enc_user_data_free (GstVP8EncUserData * user_data)
|
||||||
{
|
{
|
||||||
if (user_data->image)
|
if (user_data->image)
|
||||||
g_slice_free (vpx_image_t, user_data->image);
|
g_free (user_data->image);
|
||||||
|
|
||||||
g_list_foreach (user_data->invisible, (GFunc) _gst_mini_object_unref0, NULL);
|
g_list_foreach (user_data->invisible, (GFunc) _gst_mini_object_unref0, NULL);
|
||||||
g_list_free (user_data->invisible);
|
g_list_free (user_data->invisible);
|
||||||
g_slice_free (GstVP8EncUserData, user_data);
|
g_free (user_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
static vpx_codec_iface_t *gst_vp8_enc_get_algo (GstVPXEnc * enc);
|
static vpx_codec_iface_t *gst_vp8_enc_get_algo (GstVPXEnc * enc);
|
||||||
|
@ -317,7 +317,7 @@ gst_vp8_enc_process_frame_user_data (GstVPXEnc * enc,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (user_data->image)
|
if (user_data->image)
|
||||||
g_slice_free (vpx_image_t, user_data->image);
|
g_free (user_data->image);
|
||||||
user_data->image = NULL;
|
user_data->image = NULL;
|
||||||
return user_data;
|
return user_data;
|
||||||
}
|
}
|
||||||
|
@ -343,7 +343,7 @@ gst_vp8_enc_set_frame_user_data (GstVPXEnc * enc, GstVideoCodecFrame * frame,
|
||||||
vpx_image_t * image)
|
vpx_image_t * image)
|
||||||
{
|
{
|
||||||
GstVP8EncUserData *user_data;
|
GstVP8EncUserData *user_data;
|
||||||
user_data = g_slice_new0 (GstVP8EncUserData);
|
user_data = g_new0 (GstVP8EncUserData, 1);
|
||||||
user_data->image = image;
|
user_data->image = image;
|
||||||
gst_video_codec_frame_set_user_data (frame, user_data,
|
gst_video_codec_frame_set_user_data (frame, user_data,
|
||||||
(GDestroyNotify) gst_vp8_enc_user_data_free);
|
(GDestroyNotify) gst_vp8_enc_user_data_free);
|
||||||
|
|
|
@ -643,7 +643,7 @@ gst_vp9_enc_handle_invisible_frame_buffer (GstVPXEnc * enc, void *user_data,
|
||||||
static void
|
static void
|
||||||
gst_vp9_enc_user_data_free (vpx_image_t * image)
|
gst_vp9_enc_user_data_free (vpx_image_t * image)
|
||||||
{
|
{
|
||||||
g_slice_free (vpx_image_t, image);
|
g_free (image);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -2225,7 +2225,7 @@ gst_vpx_enc_finish (GstVideoEncoder * video_encoder)
|
||||||
static vpx_image_t *
|
static vpx_image_t *
|
||||||
gst_vpx_enc_buffer_to_image (GstVPXEnc * enc, GstVideoFrame * frame)
|
gst_vpx_enc_buffer_to_image (GstVPXEnc * enc, GstVideoFrame * frame)
|
||||||
{
|
{
|
||||||
vpx_image_t *image = g_slice_new (vpx_image_t);
|
vpx_image_t *image = g_new (vpx_image_t, 1);
|
||||||
|
|
||||||
memcpy (image, &enc->image, sizeof (*image));
|
memcpy (image, &enc->image, sizeof (*image));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue