[Bug 796814] New: gst_rtsp_media_set_clock() leaks and is not listed in the official documentation

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Sun Jul 15 09:44:17 UTC 2018


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

            Bug ID: 796814
           Summary: gst_rtsp_media_set_clock() leaks and is not listed in
                    the official documentation
    Classification: Platform
           Product: GStreamer
           Version: git master
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: gst-rtsp-server
          Assignee: gstreamer-bugs at lists.freedesktop.org
          Reporter: crg7475 at mailbox.org
        QA Contact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---

First, I cannot find gst_rtsp_media_set_clock() here, even though it s part of
the official API:
https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-rtsp-server/html/GstRTSPMedia.html

Second, I think this function causes a leak. Inside, I see that it first
unref's any previously set clock, and then refs the new clock. However, I don't
see anything in gst_rtsp_media_finalize() that unrefs that clock.

This might explain why I haven't seen this leak before - if no clock is
explicitely set, then automatic clock negotiation is performed in the media's
pipeline, which does not touch the gst_object_ref() call inside
gst_rtsp_media_set_clock().

So, the fix would be to unref priv->clock if it isn't NULL. Or am I missing
something?

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