summaryrefslogtreecommitdiff
path: root/debian/patches/upstream_Build-fixes-for-glib-2.31.diff
blob: 110798bfa89b23c3fccc541ab36409563a7e3500 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
commit d5512e599772f87146ba9b33d9d3fec0d0629853
Author: Philippe Normand <pnormand@igalia.com>
Date:   Fri Oct 28 16:47:14 2011 +0000

    [GTK] Build fixes for glib 2.31 (current master)
    https://bugs.webkit.org/show_bug.cgi?id=70679
    
    Reviewed by Martin Robinson.
    
    g_cond_new and g_mutex_new have been replaced by _init
    functions. Same for _free, replaced by _clear.
    
    * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
    (webkit_video_sink_init):
    (webkit_video_sink_dispose):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@98731 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Index: qtwebkit-2.2.1/Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp
===================================================================
--- qtwebkit-2.2.1.orig/Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp	2013-06-26 13:32:58.941707781 +0200
+++ qtwebkit-2.2.1/Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp	2013-06-26 13:32:58.913708927 +0200
@@ -33,6 +33,7 @@
 #include <glib.h>
 #include <gst/gst.h>
 #include <gst/video/video.h>
+#include <wtf/FastAllocBase.h>
 
 static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE("sink",
                                                                    GST_PAD_SINK, GST_PAD_ALWAYS,
@@ -104,8 +105,15 @@
     WebKitVideoSinkPrivate* priv;
 
     sink->priv = priv = G_TYPE_INSTANCE_GET_PRIVATE(sink, WEBKIT_TYPE_VIDEO_SINK, WebKitVideoSinkPrivate);
+#if GLIB_CHECK_VERSION(2, 31, 0)
+    priv->data_cond = WTF::fastNew<GCond>();
+    g_cond_init(priv->data_cond);
+    priv->buffer_mutex = WTF::fastNew<GMutex>();
+    g_mutex_init(priv->buffer_mutex);
+#else
     priv->data_cond = g_cond_new();
     priv->buffer_mutex = g_mutex_new();
+#endif
 }
 
 static gboolean
@@ -234,12 +242,22 @@
     WebKitVideoSinkPrivate* priv = sink->priv;
 
     if (priv->data_cond) {
+#if GLIB_CHECK_VERSION(2, 31, 0)
+        g_cond_clear(priv->data_cond);
+        WTF::fastDelete(priv->data_cond);
+#else
         g_cond_free(priv->data_cond);
+#endif
         priv->data_cond = 0;
     }
 
     if (priv->buffer_mutex) {
+#if GLIB_CHECK_VERSION(2, 31, 0)
+        g_mutex_clear(priv->buffer_mutex);
+        WTF::fastDelete(priv->buffer_mutex);
+#else
         g_mutex_free(priv->buffer_mutex);
+#endif
         priv->buffer_mutex = 0;
     }