After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 787736 - mssdemux: unref caps in error case
mssdemux: unref caps in error case
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other All
: Normal normal
: 1.13.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-09-15 18:25 UTC by Ponnam Srinivas
Modified: 2017-09-15 19:35 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Ponnam Srinivas 2017-09-15 18:25:14 UTC
Hi,

in file ext/smoothstreaming/gstmssdemux.c func:gst_mss_demux_stream_select_bitrate() line 571 and 583

Unref a GstCaps missed when an error case.

Please check and share feedback

code:
caps = gst_mss_stream_get_caps (mssstream->manifest_stream);

    GST_DEBUG_OBJECT (stream->pad,
        "Starting streams reconfiguration due to bitrate changes");

    if (protected) {
      const gchar *sys_ids[2] = { protection_system_id, NULL };
      const gchar *selected_system = gst_protection_select_system (sys_ids);

      if (!selected_system) {
        GST_ERROR_OBJECT (mssdemux, "stream is protected, but no "
            "suitable decryptor element has been found");
        return FALSE;
      }

      gst_mss_demux_apply_protection_system (caps, selected_system);
    }

sol:
gst_caps_unref (caps);

Thanks
Comment 1 Tim-Philipp Müller 2017-09-15 19:35:27 UTC
Please attach a patch next time, thanks!

commit 6eff4f8d8152f17734c22b8f9879b2eb23ef4bd2 (HEAD -> master)
Author: Tim-Philipp Müller <tim@centricular.com>
Date:   Fri Sep 15 20:34:28 2017 +0100

    mssdemux: fix caps leak in error code path
    
    https://bugzilla.gnome.org/show_bug.cgi?id=787736