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 623196 - rtpptdemux: don't send custom downstream event twice
rtpptdemux: don't send custom downstream event twice
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other All
: Normal blocker
: 0.10.24
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-06-30 09:17 UTC by Thijs Vermeir
Modified: 2010-06-30 23:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
rtpptdemux: don't send custom downstream event twice (802 bytes, patch)
2010-06-30 09:17 UTC, Thijs Vermeir
reviewed Details | Review
rtpptdemux: fix memleak on custom downstream events (1.41 KB, patch)
2010-06-30 10:22 UTC, Thijs Vermeir
needs-work Details | Review
rtpptdemux: fix memleak on custom downstream events (1.41 KB, patch)
2010-06-30 10:34 UTC, Thijs Vermeir
none Details | Review

Description Thijs Vermeir 2010-06-30 09:17:22 UTC
This element is sending custom downstream events twice downstream.
Propably the writter just forgot to add the break statement in the switch.
Comment 1 Thijs Vermeir 2010-06-30 09:17:24 UTC
Created attachment 164953 [details] [review]
rtpptdemux: don't send custom downstream event twice
Comment 2 Tim-Philipp Müller 2010-06-30 10:12:23 UTC
Oh, that would lead to refcounting errors / crashes too I suppose, since gst_pad_event_default() takes ownership of the event.

However, I'm not sure this makes the code entirely correct yet.

We still leak the event in the else branch of the if (rtpdemuxpad) above. Also, I wonder if it needs to be gst_pad_get_parent() at the beginning.
Comment 3 Thijs Vermeir 2010-06-30 10:22:07 UTC
Created attachment 164959 [details] [review]
rtpptdemux: fix memleak on custom downstream events

by not sending custom downstream event twice and fix memleak when
not handling the event
Comment 4 Tim-Philipp Müller 2010-06-30 10:33:46 UTC
  gst_object_unref (event);

needs to be changed to

  gst_event_unref (event);

Feel free to push once that's fixed up, thanks!
Comment 5 Thijs Vermeir 2010-06-30 10:34:15 UTC
Created attachment 164960 [details] [review]
rtpptdemux: fix memleak on custom downstream events

by not sending custom downstream event twice and fix memleak when
not handling the event
Comment 6 Thijs Vermeir 2010-06-30 10:41:25 UTC
committed!