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 781000 - Unexpected ERROR if changing states while pushing a sticky event.
Unexpected ERROR if changing states while pushing a sticky event.
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-04-06 23:22 UTC by Olivier Crête
Modified: 2018-11-03 12:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
pad: Return FLUSHING and not ERROR on event failure (953 bytes, patch)
2017-04-06 23:22 UTC, Olivier Crête
none Details | Review
test: Test that failed events return flushing (3.49 KB, patch)
2017-04-06 23:22 UTC, Olivier Crête
none Details | Review

Description Olivier Crête 2017-04-06 23:22:19 UTC
Currently, if the downstream element is stopped or goes flushing while a sticky event is pushed downstream as caused by a buffer push, it will cause a castrophic failure as the gst_pad_push() will return GST_FLOW_ERROR.

I think it should return GST_FLOW_FLUSHING instead, so that it can be safely ignored if a flush caused it.
Comment 1 Olivier Crête 2017-04-06 23:22:41 UTC
Created attachment 349419 [details] [review]
pad: Return FLUSHING and not ERROR on event failure

Returning ERROR causes pipelines to fail on downwards state changes if you are
unlucky and try to push an sticky event while stopping. Returning FLUSHING seems to
have no adverse effects and gets the right result.
Comment 2 Olivier Crête 2017-04-06 23:22:45 UTC
Created attachment 349420 [details] [review]
test: Test that failed events return flushing

When a sticky event reaches the sink and the sink
is flushing, then the return value is FALSE, this should cause
a gst_pad_push() that caused this event to flow forward to fail
with GST_FLOW_FLUSHING.
Comment 3 Nicolas Dufresne (ndufresne) 2017-04-07 00:27:32 UTC
Review of attachment 349419 [details] [review]:

::: gst/gstpad.c
@@ +5615,3 @@
         break;
       default:
+        ret = GST_FLOW_FLUSHING;

Why do you fix this issue differently compare to all the other places ? We have fixed this by checking if the peer-pad has the flushing flag set in all other places.
Comment 4 Olivier Crête 2017-04-07 01:07:31 UTC
This is in sink pad on the downstream side. It's not about the peer pad being flushing, but about the element. For example, basesrc returns FALSE for sticky events after a flush start.
Comment 5 GStreamer system administrator 2018-11-03 12:40:28 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/228.