}
static gint
-find_stream_by_id (GstRTSPStream * stream, gconstpointer a)
+find_stream_by_id (GstRTSPStream * stream, gint * id)
{
- gint id = GPOINTER_TO_INT (a);
-
- if (stream->id == id)
+ if (stream->id == *id)
return 0;
return -1;
}
static gint
-find_stream_by_channel (GstRTSPStream * stream, gconstpointer a)
+find_stream_by_channel (GstRTSPStream * stream, gint * channel)
{
- gint channel = GPOINTER_TO_INT (a);
-
- if (stream->channel[0] == channel || stream->channel[1] == channel)
+ if (stream->channel[0] == *channel || stream->channel[1] == *channel)
return 0;
return -1;
}
static gint
-find_stream_by_pt (GstRTSPStream * stream, gconstpointer a)
+find_stream_by_pt (GstRTSPStream * stream, gint * pt)
{
- gint pt = GPOINTER_TO_INT (a);
-
- if (stream->pt == pt)
+ if (stream->pt == *pt)
return 0;
return -1;
/* If we have a dynamic payload type, see if we have a stream with the
* same payload number. If there is one, they are part of the same
* container and we only need to add one pad. */
- if (find_stream (src, GINT_TO_POINTER (stream->pt),
- (gpointer) find_stream_by_pt)) {
+ if (find_stream (src, &stream->pt, (gpointer) find_stream_by_pt)) {
stream->container = TRUE;
}
}
GST_DEBUG_OBJECT (src, "stream: %u, SSRC %d, PT %d", id, ssrc, pt);
- stream =
- find_stream (src, GINT_TO_POINTER (id), (gpointer) find_stream_by_id);
+ stream = find_stream (src, &id, (gpointer) find_stream_by_id);
if (stream == NULL)
goto unknown_stream;
GST_DEBUG_OBJECT (src, "getting pt map for pt %d in session %d", pt, session);
GST_RTSP_STATE_LOCK (src);
- stream =
- find_stream (src, GINT_TO_POINTER (session),
- (gpointer) find_stream_by_id);
+ stream = find_stream (src, &session, (gpointer) find_stream_by_id);
if (!stream)
goto unknown_stream;
GST_DEBUG_OBJECT (src, "setting stream for session %u to EOS", session);
/* get stream for session */
- stream =
- find_stream (src, GINT_TO_POINTER (session),
- (gpointer) find_stream_by_id);
+ stream = find_stream (src, &session, (gpointer) find_stream_by_id);
if (!stream)
goto unknown_stream;
channel = message.type_data.data.channel;
- stream =
- find_stream (src, GINT_TO_POINTER (channel),
- (gpointer) find_stream_by_channel);
+ stream = find_stream (src, &channel, (gpointer) find_stream_by_channel);
if (!stream)
goto unknown_stream;