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

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


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

--- Comment #5 from David Svensson Fors <davidsf at axis.com> ---
(In reply to Sebastian Dröge (slomo) from comment #4)
> Review of attachment 373396 [details] [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.

Yes, there should be error handling in the case of 256 taken ids. Probably
for the case where ct->interleaved.max goes past 255.

-- 
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