From: gb Date: Mon, 3 May 2010 08:51:28 +0000 (+0000) Subject: Fix build with older gstreamer libs where gst_buffer_unref() is not a plain function. X-Git-Tag: 1.19.3~503^2~3472 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=34764d2c2c8125a0d5c9f82691613f7d1d1dfd77;p=platform%2Fupstream%2Fgstreamer.git Fix build with older gstreamer libs where gst_buffer_unref() is not a plain function. --- diff --git a/gst-libs/gst/vaapi/gstvaapidecoder.c b/gst-libs/gst/vaapi/gstvaapidecoder.c index 1b9bd01..326cbf8 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder.c +++ b/gst-libs/gst/vaapi/gstvaapidecoder.c @@ -101,6 +101,12 @@ create_buffer(const guchar *buf, guint buf_size, gboolean copy) return buffer; } +static void +destroy_buffer(GstBuffer *buffer) +{ + gst_buffer_unref(buffer); +} + static gboolean push_buffer(GstVaapiDecoder *decoder, GstBuffer *buffer) { @@ -240,7 +246,7 @@ gst_vaapi_decoder_finalize(GObject *object) } if (priv->buffers) { - clear_queue(priv->buffers, (GDestroyNotify)gst_buffer_unref); + clear_queue(priv->buffers, (GDestroyNotify)destroy_buffer); g_queue_free(priv->buffers); priv->buffers = NULL; }