mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 02:01:12 +00:00
gdkpixbuf: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
This commit is contained in:
parent
1df462ec5b
commit
9ab2541266
1 changed files with 2 additions and 2 deletions
|
@ -267,7 +267,7 @@ gst_gdk_pixbuf_sink_pixbuf_destroy_notify (guchar * pixels,
|
||||||
{
|
{
|
||||||
gst_video_frame_unmap (frame);
|
gst_video_frame_unmap (frame);
|
||||||
gst_buffer_unref (frame->buffer);
|
gst_buffer_unref (frame->buffer);
|
||||||
g_slice_free (GstVideoFrame, frame);
|
g_free (frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
static GdkPixbuf *
|
static GdkPixbuf *
|
||||||
|
@ -281,7 +281,7 @@ gst_gdk_pixbuf_sink_get_pixbuf_from_buffer (GstGdkPixbufSink * sink,
|
||||||
g_return_val_if_fail (GST_VIDEO_SINK_WIDTH (sink) > 0, NULL);
|
g_return_val_if_fail (GST_VIDEO_SINK_WIDTH (sink) > 0, NULL);
|
||||||
g_return_val_if_fail (GST_VIDEO_SINK_HEIGHT (sink) > 0, NULL);
|
g_return_val_if_fail (GST_VIDEO_SINK_HEIGHT (sink) > 0, NULL);
|
||||||
|
|
||||||
frame = g_slice_new0 (GstVideoFrame);
|
frame = g_new0 (GstVideoFrame, 1);
|
||||||
gst_video_frame_map (frame, &sink->info, buf, GST_MAP_READ);
|
gst_video_frame_map (frame, &sink->info, buf, GST_MAP_READ);
|
||||||
|
|
||||||
bytes_per_pixel = (sink->has_alpha) ? 4 : 3;
|
bytes_per_pixel = (sink->has_alpha) ? 4 : 3;
|
||||||
|
|
Loading…
Reference in a new issue