x264enc: 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 17:15:00 +00:00 committed by GStreamer Marge Bot
parent 13f3feed04
commit cb64cdae95

View file

@ -1346,7 +1346,7 @@ gst_x264_enc_queue_frame (GstX264Enc * enc, GstVideoCodecFrame * frame,
if (!gst_video_frame_map (&vframe, info, frame->input_buffer, GST_MAP_READ))
return NULL;
fdata = g_slice_new (FrameData);
fdata = g_new (FrameData, 1);
fdata->frame = gst_video_codec_frame_ref (frame);
fdata->vframe = vframe;
@ -1368,7 +1368,7 @@ gst_x264_enc_dequeue_frame (GstX264Enc * enc, GstVideoCodecFrame * frame)
gst_video_frame_unmap (&fdata->vframe);
gst_video_codec_frame_unref (fdata->frame);
g_slice_free (FrameData, fdata);
g_free (fdata);
enc->pending_frames = g_list_delete_link (enc->pending_frames, l);
return;
@ -1385,7 +1385,7 @@ gst_x264_enc_dequeue_all_frames (GstX264Enc * enc)
gst_video_frame_unmap (&fdata->vframe);
gst_video_codec_frame_unref (fdata->frame);
g_slice_free (FrameData, fdata);
g_free (fdata);
}
g_list_free (enc->pending_frames);
enc->pending_frames = NULL;