summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl-Anton Ingmarsson <ca.ingmarsson@gmail.com>2010-06-28 12:00:55 +0200
committerCarl-Anton Ingmarsson <ca.ingmarsson@gmail.com>2010-06-28 12:00:55 +0200
commit380ec88b4ce3ef09e50fbe1349cda2652d2e3846 (patch)
tree5dc721097da31e847dd2f3b02f22709b67ea60ce
parent0aa4d01c0ff5c8e687d99320c7bd1e498f0d1a15 (diff)
vdpauh264dec: don't use deprecated g_ptr_array_free incase glib >= 2.22
-rw-r--r--sys/vdpau/h264/gsth264frame.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/vdpau/h264/gsth264frame.c b/sys/vdpau/h264/gsth264frame.c
index 0f99226ef..4b6952f21 100644
--- a/sys/vdpau/h264/gsth264frame.c
+++ b/sys/vdpau/h264/gsth264frame.c
@@ -53,7 +53,12 @@ static void
gst_h264_frame_finalize (GstH264Frame * h264_frame)
{
g_ptr_array_foreach (h264_frame->slices, (GFunc) gst_buffer_unref, NULL);
+
+#if GLIB_CHECK_VERSION (2,22,0)
+ g_ptr_array_unref (h264_frame->slices);
+#else
g_ptr_array_free (h264_frame->slices, TRUE);
+#endif
GST_MINI_OBJECT_CLASS (gst_h264_frame_parent_class)->finalize
(GST_MINI_OBJECT (h264_frame));