rtpbasepayload: don't use GINT_TO_POINTER with GType

GType can (and will) be 64bit. GINT_TO_POINTER is not.
This will result in the api-type checked for being a different one than
it actually is...
This commit is contained in:
Havard Graff 2019-06-12 14:32:03 +02:00 committed by Sebastian Dröge
parent 2e342a16ce
commit f7408f9418

View file

@ -1210,7 +1210,7 @@ map_failed:
static gboolean static gboolean
foreach_metadata_drop (GstBuffer * buffer, GstMeta ** meta, gpointer user_data) foreach_metadata_drop (GstBuffer * buffer, GstMeta ** meta, gpointer user_data)
{ {
GType drop_api_type = (GType) GPOINTER_TO_INT (user_data); GType drop_api_type = (GType) user_data;
const GstMetaInfo *info = (*meta)->info; const GstMetaInfo *info = (*meta)->info;
if (info->api == drop_api_type) if (info->api == drop_api_type)
@ -1223,7 +1223,7 @@ static gboolean
filter_meta (GstBuffer ** buffer, guint idx, gpointer user_data) filter_meta (GstBuffer ** buffer, guint idx, gpointer user_data)
{ {
return gst_buffer_foreach_meta (*buffer, foreach_metadata_drop, return gst_buffer_foreach_meta (*buffer, foreach_metadata_drop,
GINT_TO_POINTER (GST_RTP_SOURCE_META_API_TYPE)); (gpointer) GST_RTP_SOURCE_META_API_TYPE);
} }
/* Updates the SSRC, payload type, seqnum and timestamp of the RTP buffer /* Updates the SSRC, payload type, seqnum and timestamp of the RTP buffer