diff --git a/subprojects/gst-libav/ext/libav/gstavaudenc.c b/subprojects/gst-libav/ext/libav/gstavaudenc.c index 283d0f4397..d1bd7cb83b 100644 --- a/subprojects/gst-libav/ext/libav/gstavaudenc.c +++ b/subprojects/gst-libav/ext/libav/gstavaudenc.c @@ -382,7 +382,7 @@ static void gst_ffmpegaudenc_free_avpacket (gpointer pkt) { av_packet_unref ((AVPacket *) pkt); - g_slice_free (AVPacket, pkt); + g_free (pkt); } typedef struct @@ -405,7 +405,7 @@ buffer_info_free (void *opaque, guint8 * data) av_freep (&info->ext_data); av_freep (&info->ext_data_array); } - g_slice_free (BufferInfo, info); + g_free (info); } static GstFlowReturn @@ -425,7 +425,7 @@ gst_ffmpegaudenc_send_frame (GstFFMpegAudEnc * ffmpegaudenc, GstBuffer * buffer) ctx = ffmpegaudenc->context; if (buffer != NULL) { - BufferInfo *buffer_info = g_slice_new0 (BufferInfo); + BufferInfo *buffer_info = g_new0 (BufferInfo, 1); guint8 *audio_in; guint in_size; @@ -579,7 +579,7 @@ gst_ffmpegaudenc_receive_packet (GstFFMpegAudEnc * ffmpegaudenc, ctx = ffmpegaudenc->context; - pkt = g_slice_new0 (AVPacket); + pkt = g_new0 (AVPacket, 1); res = avcodec_receive_packet (ctx, pkt); @@ -619,7 +619,7 @@ gst_ffmpegaudenc_receive_packet (GstFFMpegAudEnc * ffmpegaudenc, *got_packet = TRUE; } else { GST_LOG_OBJECT (ffmpegaudenc, "no output produced"); - g_slice_free (AVPacket, pkt); + g_free (pkt); ret = GST_FLOW_OK; *got_packet = FALSE; } diff --git a/subprojects/gst-libav/ext/libav/gstavviddec.c b/subprojects/gst-libav/ext/libav/gstavviddec.c index 43cea456ae..85e34a0c35 100644 --- a/subprojects/gst-libav/ext/libav/gstavviddec.c +++ b/subprojects/gst-libav/ext/libav/gstavviddec.c @@ -723,7 +723,7 @@ gst_ffmpegviddec_video_frame_new (GstFFMpegVidDec * ffmpegdec, { GstFFMpegVidDecVideoFrame *dframe; - dframe = g_slice_new0 (GstFFMpegVidDecVideoFrame); + dframe = g_new0 (GstFFMpegVidDecVideoFrame, 1); dframe->ffmpegdec = ffmpegdec; dframe->frame = frame; @@ -747,7 +747,7 @@ gst_ffmpegviddec_video_frame_free (GstFFMpegVidDec * ffmpegdec, if (frame->avbuffer) { av_buffer_unref (&frame->avbuffer); } - g_slice_free (GstFFMpegVidDecVideoFrame, frame); + g_free (frame); } static void diff --git a/subprojects/gst-libav/ext/libav/gstavvidenc.c b/subprojects/gst-libav/ext/libav/gstavvidenc.c index 4689959066..fef5cae904 100644 --- a/subprojects/gst-libav/ext/libav/gstavvidenc.c +++ b/subprojects/gst-libav/ext/libav/gstavvidenc.c @@ -484,7 +484,7 @@ static void gst_ffmpegvidenc_free_avpacket (gpointer pkt) { av_packet_unref ((AVPacket *) pkt); - g_slice_free (AVPacket, pkt); + g_free (pkt); } typedef struct @@ -500,7 +500,7 @@ buffer_info_free (void *opaque, guint8 * data) gst_video_frame_unmap (&info->vframe); gst_buffer_unref (info->buffer); - g_slice_free (BufferInfo, info); + g_free (info); } static enum AVStereo3DType @@ -591,14 +591,14 @@ gst_ffmpegvidenc_send_frame (GstFFMpegVidEnc * ffmpegenc, if (GST_VIDEO_CODEC_FRAME_IS_FORCE_KEYFRAME (frame)) picture->pict_type = AV_PICTURE_TYPE_I; - buffer_info = g_slice_new0 (BufferInfo); + buffer_info = g_new0 (BufferInfo, 1); buffer_info->buffer = gst_buffer_ref (frame->input_buffer); if (!gst_video_frame_map (&buffer_info->vframe, info, frame->input_buffer, GST_MAP_READ)) { GST_ERROR_OBJECT (ffmpegenc, "Failed to map input buffer"); gst_buffer_unref (buffer_info->buffer); - g_slice_free (BufferInfo, buffer_info); + g_free (buffer_info); gst_video_codec_frame_unref (frame); goto done; } @@ -677,15 +677,15 @@ gst_ffmpegvidenc_receive_packet (GstFFMpegVidEnc * ffmpegenc, *got_packet = FALSE; - pkt = g_slice_new0 (AVPacket); + pkt = g_new0 (AVPacket, 1); res = avcodec_receive_packet (ffmpegenc->context, pkt); if (res == AVERROR (EAGAIN)) { - g_slice_free (AVPacket, pkt); + g_free (pkt); goto done; } else if (res == AVERROR_EOF) { - g_slice_free (AVPacket, pkt); + g_free (pkt); ret = GST_FLOW_EOS; goto done; } else if (res < 0) {