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 750036 - dtls: wrong management of pads in releasing operation
dtls: wrong management of pads in releasing operation
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 1.5.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-05-28 14:10 UTC by sancane
Modified: 2015-05-28 20:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
file generated using git format-patch (946 bytes, patch)
2015-05-28 14:10 UTC, sancane
committed Details | Review
file generated using git-format-patch (921 bytes, patch)
2015-05-28 14:11 UTC, sancane
committed Details | Review
Requested pads should be released (2.24 KB, patch)
2015-05-28 14:13 UTC, sancane
committed Details | Review

Description sancane 2015-05-28 14:10:31 UTC
Created attachment 304167 [details] [review]
file generated using git format-patch

Fix extra unref and wrong release call in gst_dtls_dec_release_pad
Comment 1 sancane 2015-05-28 14:11:46 UTC
Created attachment 304168 [details] [review]
file generated using git-format-patch
Comment 2 sancane 2015-05-28 14:13:20 UTC
Created attachment 304169 [details] [review]
Requested pads should be released
Comment 3 sancane 2015-05-28 14:14:53 UTC
Next piece of code reproduces this bug:

#include <gst/gst.h>
#include <glib.h>

int
main (int   argc,
      char *argv[])
{
  GstElement *dtlssrtpdec;
  GstPad *data_pad;

  gst_init (&argc, &argv);

  dtlssrtpdec = gst_element_factory_make ("dtlssrtpdec", NULL);

  if (dtlssrtpdec == NULL) {
    g_printerr ("dtlssrtpdec could not be created. Exiting.\n");
    return -1;
  }

  data_pad = gst_element_get_request_pad (dtlssrtpdec, "data_src");

  if (data_pad == NULL) {
    g_printerr ("data_pad could not get data_src pad. Exiting.\n");
    return -1;
  }

  GST_INFO ("Releasing pad %" GST_PTR_FORMAT, data_pad);

  gst_element_release_request_pad (dtlssrtpdec, data_pad);

  GST_DEBUG ("Bye__");

  gst_object_unref (GST_OBJECT (data_pad));
  gst_object_unref (GST_OBJECT (dtlssrtpdec));

  return 0;
}