From 217e2b3e3ed6cbd140dfd91d06cdaef510db8c3d Mon Sep 17 00:00:00 2001 From: Julien Moutte Date: Fri, 9 Jan 2004 18:05:56 +0000 Subject: [PATCH] ext/ffmpeg/gstffmpegcolorspace.c: Implementing gst_pad_alloc_buffer to use optimized buffer allocation. Original commit message from CVS: * ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_chain): Implementing gst_pad_alloc_buffer to use optimized buffer allocation. * gst-libs/gst/xoverlay/xoverlay.c: (gst_x_overlay_got_desired_size): Updating doc for the xid being 0. * gst/videoscale/gstvideoscale.c: (gst_videoscale_chain): Implementing gst_pad_alloc_buffer to use optimized buffer allocation. * gst/videotestsrc/gstvideotestsrc.c: (gst_videotestsrc_get): Implementing gst_pad_alloc_buffer to use optimized buffer allocation. * sys/ximage/ximagesink.c: (gst_ximagesink_chain), (gst_ximagesink_buffer_free), (gst_ximagesink_buffer_alloc), (gst_ximagesink_set_xwindow_id), (gst_ximagesink_init): Implementing the bufferalloc_function to replace bufferpools, fixing the XOverlay interface implementation to handle xid being 0 and fix some bugs triggered by Benjamin's testcase. * sys/xvimage/xvimagesink.c: (gst_xvimagesink_chain), (gst_xvimagesink_buffer_free), (gst_xvimagesink_buffer_alloc), (gst_xvimagesink_set_xwindow_id), (gst_xvimagesink_init): Implementing the bufferalloc_function to replace bufferpools, fixing the XOverlay interface implementation to handle xid being 0 and fix some bugs triggered by Benjamin's testcase. --- ext/ffmpeg/gstffmpegcolorspace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/ffmpeg/gstffmpegcolorspace.c b/ext/ffmpeg/gstffmpegcolorspace.c index 4d86325..2056575 100644 --- a/ext/ffmpeg/gstffmpegcolorspace.c +++ b/ext/ffmpeg/gstffmpegcolorspace.c @@ -353,7 +353,8 @@ gst_ffmpegcsp_chain (GstPad *pad, guint size = avpicture_get_size (space->to_pixfmt, space->width, space->height); - outbuf = gst_buffer_new_and_alloc (size); + outbuf = gst_pad_alloc_buffer (gst_pad_get_peer (pad), + GST_BUFFER_OFFSET_NONE, size); /* convert */ avpicture_fill ((AVPicture *) space->from_frame, GST_BUFFER_DATA (inbuf), -- 2.7.4