openjpeg: drop use of GSlice

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
This commit is contained in:
Tim-Philipp Müller 2023-01-08 18:06:07 +00:00 committed by GStreamer Marge Bot
parent e214be79de
commit c1759353c1
2 changed files with 4 additions and 4 deletions

View file

@ -1233,7 +1233,7 @@ static GstOpenJPEGCodecMessage *
gst_openjpeg_decode_message_new (GstOpenJPEGDec * self,
GstVideoCodecFrame * frame, int num_stripe)
{
GstOpenJPEGCodecMessage *message = g_slice_new0 (GstOpenJPEGCodecMessage);
GstOpenJPEGCodecMessage *message = g_new0 (GstOpenJPEGCodecMessage, 1);
GST_DEBUG_OBJECT (self, "message: %p", message);
message->frame = gst_video_codec_frame_ref (frame);
message->stripe = num_stripe;
@ -1253,7 +1253,7 @@ gst_openjpeg_decode_message_free (GstOpenJPEGDec * self,
gst_buffer_unref (message->input_buffer);
gst_video_codec_frame_unref (message->frame);
GST_DEBUG_OBJECT (self, "message: %p", message);
g_slice_free (GstOpenJPEGCodecMessage, message);
g_free (message);
return NULL;
}

View file

@ -1101,7 +1101,7 @@ static GstOpenJPEGCodecMessage *
gst_openjpeg_encode_message_new (GstOpenJPEGEnc * self,
GstVideoCodecFrame * frame, int num_stripe)
{
GstOpenJPEGCodecMessage *message = g_slice_new0 (GstOpenJPEGCodecMessage);
GstOpenJPEGCodecMessage *message = g_new0 (GstOpenJPEGCodecMessage, 1);
message->frame = gst_video_codec_frame_ref (frame);
message->stripe = num_stripe;
@ -1117,7 +1117,7 @@ gst_openjpeg_encode_message_free (GstOpenJPEGCodecMessage * message)
gst_video_codec_frame_unref (message->frame);
if (message->output_buffer)
gst_buffer_unref (message->output_buffer);
g_slice_free (GstOpenJPEGCodecMessage, message);
g_free (message);
}
return NULL;
}