mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 07:16:55 +00:00
dataqueue: can't pass a GType through GINT_TO_POINTER
Use GSIZE_TO_POINTER instead. sizeof(GType) may be larger than sizeof(gulong) and sizeof(int), so the casts may chop off some bits from the GType value on some architectures.
This commit is contained in:
parent
745821d5f1
commit
3f8eff5c7e
1 changed files with 2 additions and 2 deletions
|
@ -556,7 +556,7 @@ flushing:
|
|||
static gint
|
||||
is_of_type (gconstpointer a, gconstpointer b)
|
||||
{
|
||||
return !G_TYPE_CHECK_INSTANCE_TYPE (a, GPOINTER_TO_INT (b));
|
||||
return !G_TYPE_CHECK_INSTANCE_TYPE (a, GPOINTER_TO_SIZE (b));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -583,7 +583,7 @@ gst_data_queue_drop_head (GstDataQueue * queue, GType type)
|
|||
GST_DEBUG ("queue:%p", queue);
|
||||
|
||||
GST_DATA_QUEUE_MUTEX_LOCK (queue);
|
||||
idx = gst_queue_array_find (priv->queue, is_of_type, GINT_TO_POINTER (type));
|
||||
idx = gst_queue_array_find (priv->queue, is_of_type, GSIZE_TO_POINTER (type));
|
||||
|
||||
if (idx == -1)
|
||||
goto done;
|
||||
|
|
Loading…
Reference in a new issue