Commit ab64b00b authored by Kouhei Sutou's avatar Kouhei Sutou Committed by Sebastian Dröge

playback: fix build error for 64bit Windows build by MinGW

Casting to gpointer from gulong generates the following warning with
64bit Windows target MinGW:

    gstplaybin2.c: In function 'pad_added_cb':
    gstplaybin2.c:3476:7: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
           (gpointer) group_id_probe_handler);
           ^
    cc1: all warnings being treated as errors

We should cast to guintptr from gulong before we cast to gpointer.

https://bugzilla.gnome.org/show_bug.cgi?id=754755
parent df931fb0
......@@ -250,6 +250,8 @@ GST_DEBUG_CATEGORY_STATIC (gst_play_bin_debug);
#define GST_IS_PLAY_BIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_PLAY_BIN))
#define GST_IS_PLAY_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_PLAY_BIN))
#define ULONG_TO_POINTER(number) ((gpointer) (guintptr) (number))
#define VOLUME_MAX_DOUBLE 10.0
typedef struct _GstPlayBin GstPlayBin;
......@@ -3437,7 +3439,7 @@ pad_added_cb (GstElement * decodebin, GstPad * pad, GstSourceGroup * group)
G_CALLBACK (notify_tags_cb), ntdata, (GClosureNotify) g_free,
(GConnectFlags) 0);
g_object_set_data (G_OBJECT (sinkpad), "playbin.notify_tags_handler",
(gpointer) (guintptr) notify_tags_handler);
ULONG_TO_POINTER (notify_tags_handler));
}
/* store the pad in the array */
......@@ -3472,7 +3474,7 @@ pad_added_cb (GstElement * decodebin, GstPad * pad, GstSourceGroup * group)
gst_pad_add_probe (pad, GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM,
_uridecodebin_event_probe, group, NULL);
g_object_set_data (G_OBJECT (pad), "playbin.event_probe_id",
(gpointer) group_id_probe_handler);
ULONG_TO_POINTER (group_id_probe_handler));
if (changed) {
int signal;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment