[Bug 796988] rtsp-client: We allow reused channel numbers for interleaved

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Tue Aug 28 07:37:55 UTC 2018


https://bugzilla.gnome.org/show_bug.cgi?id=796988

--- Comment #7 from David Svensson Fors <davidsf at axis.com> ---
(In reply to Sebastian Dröge (slomo) from comment #6)
> (In reply to David Svensson Fors from comment #5)
> > (In reply to Sebastian Dröge (slomo) from comment #4)
> > > Review of attachment 373396 [details] [review] [review] [review]:
> > > 
> > > ::: gst/rtsp-server/rtsp-client.c
> > > @@ +2091,3 @@
> > > +              GINT_TO_POINTER (ct->interleaved.max))) {
> > > +        gst_rtsp_session_media_alloc_channels (ctx->sessmedia,
> > > +            &ct->interleaved);
> > > 
> > > This would loop forever if all 256 ids are taken already. In all other
> > > cases, can this actually loop multiple times? Shouldn't the allocation of
> > > the channels always give free, valid values?
> > 
> > It does loop twice when the client passes 0-1 for both streams. The first
> > call to gst_rtsp_session_media_alloc_channels() gives (0,1), because in
> > there is a counter that starts from 0, independently of the
> > priv->transports table.
> 
> So if 0-1, 2-3 are used already, this would loop three times to count up to
> 4-5?

Yes. And the client could allocate channels in any pattern first, before it
reuses a channel, so if we want to use the lowest avalable channel we probably
need to loop.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list