[Bug 764744] Crashes when multiple udpsrc are created for each client on a shared media, misses tracking and cleanup

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Tue Apr 19 14:25:07 UTC 2016


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

--- Comment #23 from Jake Foytik <jake.foytik at ipconfigure.com> ---
> @@ +1492,3 @@
> +    if (transport_udpsrcs->udpsrc[0] == NULL
> +        && transport_udpsrcs->udpsrc[1] == NULL)
> +      g_slice_free (GstRTSPStreamUDPSrcs, transport_udpsrcs);
>
> The problem here is that you free the transport if udpsrc[1] == NULL. No matter 
> if udpsrc[0] is NULL or not. Doesn't this fail for streams without RTCP now    
> because you will free the data and not keep track of it?

The transport_udpsrcs struct will only be freed if both udpsrc[0] AND udpsrc[1]
are NULL. If they are both NULL, there is no need to add an empty struct to the
hash table. If only one udpsrc is NULL, then the struct is added to the hash
table. This can be changed to the following if you think it makes it clearer:

    if (transport_udpsrcs->udpsrc[0] != NULL
        || transport_udpsrcs->udpsrc[1] != NULL)
      g_hash_table_insert (priv->udpsrcs, ct, transport_udpsrcs);
    else
      g_slice_free (GstRTSPStreamUDPSrcs, transport_udpsrcs);

I'll create an updated path to include the recommended changes.

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