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 707088 - capsfilter: Don't forget to update pending_events.
capsfilter: Don't forget to update pending_events.
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
unspecified
Other All
: Normal major
: 1.1.90
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-08-29 21:33 UTC by Mathieu Duponchelle
Modified: 2013-09-18 16:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
capsfilter: Don't forget to update pending_events. (1.13 KB, patch)
2013-08-29 21:33 UTC, Mathieu Duponchelle
needs-work Details | Review
Does what Olivier said. (1.01 KB, patch)
2013-08-30 18:35 UTC, Mathieu Duponchelle
accepted-commit_now Details | Review
Does what Olivier said because Olivier is right. (1.41 KB, patch)
2013-08-30 18:53 UTC, Mathieu Duponchelle
committed Details | Review

Description Mathieu Duponchelle 2013-08-29 21:33:29 UTC
When removing the first node using a copied pointer.
Comment 1 Mathieu Duponchelle 2013-08-29 21:33:31 UTC
Created attachment 253558 [details] [review]
capsfilter: Don't forget to update pending_events.
Comment 2 Olivier Crête 2013-08-29 21:49:17 UTC
Review of attachment 253558 [details] [review]:

::: plugins/elements/gstcapsfilter.c
@@ +371,3 @@
       if (GST_EVENT_TYPE (l->data) == GST_EVENT_SEGMENT) {
         gst_event_unref (l->data);
         l = g_list_delete_link (l, l);

Shouldn't this be
filter->pending_events = g_list_delete_link (filter->pending_events, l);
break;

As there will be only a single segment event in the list I expect ?
Comment 3 Mathieu Duponchelle 2013-08-30 01:03:46 UTC
It could be as well yes if that assumption holds.
Comment 4 Sebastian Dröge (slomo) 2013-08-30 08:07:48 UTC
Review of attachment 253558 [details] [review]:

::: plugins/elements/gstcapsfilter.c
@@ +371,3 @@
       if (GST_EVENT_TYPE (l->data) == GST_EVENT_SEGMENT) {
         gst_event_unref (l->data);
         l = g_list_delete_link (l, l);

Yes, should just be what Olivier said.
Comment 5 Mathieu Duponchelle 2013-08-30 18:35:39 UTC
Created attachment 253643 [details] [review]
Does what Olivier said.
Comment 6 Olivier Crête 2013-08-30 18:47:11 UTC
Review of attachment 253643 [details] [review]:

::: plugins/elements/gstcapsfilter.c
@@ +369,1 @@
     for (l = filter->pending_events; l;) {

This could even be this, otherwise looks good.
for (l = filter->pending_events; l; l = l->next) {
if (...) {...}
}
Comment 7 Mathieu Duponchelle 2013-08-30 18:53:17 UTC
Created attachment 253644 [details] [review]
Does what Olivier said because Olivier is right.
Comment 8 Olivier Crête 2013-08-30 19:00:39 UTC
Pushed

commit 76b5278f7ca11998cf0ad24e50ed4560a58bd22b
Author: Mathieu Duponchelle <mathieu.duponchelle@epitech.eu>
Date:   Thu Aug 29 23:18:31 2013 +0200

    capsfilter: Delete link directly in pending_events.
    
    When removing a segment event.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=707088