mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-09 16:02:59 +00:00
Fix build with older gstreamer libs where gst_buffer_unref() is not a plain function.
This commit is contained in:
parent
021d2ab947
commit
34764d2c2c
1 changed files with 7 additions and 1 deletions
|
@ -101,6 +101,12 @@ create_buffer(const guchar *buf, guint buf_size, gboolean copy)
|
||||||
return buffer;
|
return buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
destroy_buffer(GstBuffer *buffer)
|
||||||
|
{
|
||||||
|
gst_buffer_unref(buffer);
|
||||||
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
push_buffer(GstVaapiDecoder *decoder, GstBuffer *buffer)
|
push_buffer(GstVaapiDecoder *decoder, GstBuffer *buffer)
|
||||||
{
|
{
|
||||||
|
@ -240,7 +246,7 @@ gst_vaapi_decoder_finalize(GObject *object)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (priv->buffers) {
|
if (priv->buffers) {
|
||||||
clear_queue(priv->buffers, (GDestroyNotify)gst_buffer_unref);
|
clear_queue(priv->buffers, (GDestroyNotify)destroy_buffer);
|
||||||
g_queue_free(priv->buffers);
|
g_queue_free(priv->buffers);
|
||||||
priv->buffers = NULL;
|
priv->buffers = NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue