rtspsrc: just use the SDP index as the stream id
authorWim Taymans <wtaymans@redhat.com>
Wed, 5 Mar 2014 15:19:19 +0000 (16:19 +0100)
committerWim Taymans <wtaymans@redhat.com>
Thu, 6 Mar 2014 11:30:54 +0000 (12:30 +0100)
Use the index of the media stream in the SDP as the stream id instead of
keeping a separate counter.

gst/rtsp/gstrtspsrc.c
gst/rtsp/gstrtspsrc.h

index 5127785..3e227f9 100644 (file)
@@ -1429,7 +1429,7 @@ gst_rtspsrc_create_stream (GstRTSPSrc * src, GstSDPMessage * sdp, gint idx)
   stream->last_ret = GST_FLOW_NOT_LINKED;
   stream->added = FALSE;
   stream->disabled = FALSE;
-  stream->id = src->numstreams++;
+  stream->id = idx;
   stream->eos = FALSE;
   stream->discont = TRUE;
   stream->seqbase = -1;
@@ -1579,7 +1579,6 @@ gst_rtspsrc_cleanup (GstRTSPSrc * src)
     gst_bin_remove (GST_BIN_CAST (src), src->manager);
     src->manager = NULL;
   }
-  src->numstreams = 0;
   if (src->props)
     gst_structure_free (src->props);
   src->props = NULL;
index 1751b30..0ee0888 100644 (file)
@@ -193,7 +193,6 @@ struct _GstRTSPSrc {
 
   GstSDPMessage   *sdp;
   gboolean         from_sdp;
-  gint             numstreams;
   GList           *streams;
   GstStructure    *props;
   gboolean         need_activate;