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 634965 - sinks render buffers in state PAUSED when async is FALSE
sinks render buffers in state PAUSED when async is FALSE
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
0.10.30
Other Linux
: Normal normal
: 0.10.32
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-11-16 06:30 UTC by Ognyan Tonchev (redstar_)
Modified: 2010-12-28 15:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Test application which triggers the problem. (2.48 KB, text/plain)
2010-11-16 06:30 UTC, Ognyan Tonchev (redstar_)
  Details
possible patch (3.72 KB, patch)
2010-11-16 11:22 UTC, Wim Taymans
none Details | Review
a unit test that triggers gst_base_sink_wait_preroll() in state playing (2.75 KB, patch)
2010-11-17 13:31 UTC, Ognyan Tonchev (redstar_)
none Details | Review

Description Ognyan Tonchev (redstar_) 2010-11-16 06:30:29 UTC
Created attachment 174585 [details]
Test application which triggers the problem.

It seems that doing a flushing seek or sending seek_start events when async==FALSE breaks the preroll in the basesink and the sink starts rendering buffers in state PAUSED.
Attached is a small application which triggers the problem. It sets up the following pipeline:

filesrc ! matroskamux ! filesink

The problem can be seen with just any matroska file.
Comment 1 Wim Taymans 2010-11-16 11:22:42 UTC
Created attachment 174596 [details] [review]
possible patch

possible patch and unit test
Comment 2 Ognyan Tonchev (redstar_) 2010-11-16 17:26:33 UTC
After applying the patch i noticed the following problem:

I create a pipeline 'videotestsrc async=FALSE ! fakesink' and set it to PLAYING. Then i pause only the source element, do flushing seek and play it again. The pipeline is then blocked in gst_base_sink_wait_preroll ().

With async=TRUE the example above seems to work just fine.
Comment 3 Ognyan Tonchev (redstar_) 2010-11-16 17:49:35 UTC
The same thing happens even without the pausing of the source, flush_start/flush_stop will make the sink hang in gst_base_sink_wait_preroll ().
Comment 4 Ognyan Tonchev (redstar_) 2010-11-17 13:31:15 UTC
Created attachment 174679 [details] [review]
a unit test that triggers gst_base_sink_wait_preroll() in state playing
Comment 5 Wim Taymans 2010-12-02 18:13:56 UTC
commit 9076d5688fe806ac28866251ff0516d4b61d6f30
Author: Wim Taymans <wim.taymans@collabora.co.uk>
Date:   Tue Nov 16 12:20:37 2010 +0100

    basesink: also preroll after a flush with async=false
    
    Make sure to preroll after a flush even when we are async=false.
    Add unit test.
    
    Fixes #634965
Comment 6 Wim Taymans 2010-12-28 15:41:38 UTC
more fixes, also committed the (now working) unit test.

commit 17bb26b529c4e6080fa54c62d03a4982aae768a3
Author: Wim Taymans <wim.taymans@collabora.co.uk>
Date:   Tue Dec 28 16:40:28 2010 +0100

    check: add more sink unit tests

commit ef44d4b5397c3587c8cf42c467e7a8299d177ff0
Author: Wim Taymans <wim.taymans@collabora.co.uk>
Date:   Tue Dec 28 16:23:32 2010 +0100

    basesink: also preroll async=false sinks
    
    Also preroll async=false sinks after a flush.