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 707648 - queue2: Update the buffering state before stalling for more data
queue2: Update the buffering state before stalling for more data
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
unspecified
Other All
: Normal blocker
: 1.1.90
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 707772 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-09-06 18:32 UTC by Gustavo Noronha (kov)
Modified: 2013-09-18 16:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Update the buffering state before stalling for more data (1.79 KB, patch)
2013-09-06 18:32 UTC, Gustavo Noronha (kov)
committed Details | Review
Test case (20.54 KB, application/octet-stream)
2013-09-06 18:35 UTC, Gustavo Noronha (kov)
  Details

Description Gustavo Noronha (kov) 2013-09-06 18:32:03 UTC
In some cases the wait for more data was happening without updating
the buffering state, meaning the API user would not be able to notice
it should pause the pipeline and update UI to indicate that is the
case, the video would likely stutter instead.
Comment 1 Gustavo Noronha (kov) 2013-09-06 18:32:05 UTC
Created attachment 254296 [details] [review]
Update the buffering state before stalling for more data
Comment 2 Gustavo Noronha (kov) 2013-09-06 18:35:00 UTC
Created attachment 254298 [details]
Test case

This is a test case I am using to test clutter-gst 3.0 buffering behaviour. It should assert if it stops to buffer a second time, but that won't happen without the patch, because queue2 never realizes it needs to buffer, since the information it uses to decide is outdated.
Comment 3 Sebastian Dröge (slomo) 2013-09-09 12:15:37 UTC
commit 4cb596ddd6919701744387339e9a957a6f71b2b6
Author: Gustavo Noronha Silva <gns@gnome.org>
Date:   Fri Sep 6 15:09:46 2013 -0300

    Update the buffering state before stalling for more data
    
    In some cases the wait for more data was happening without updating
    the buffering state, meaning the API user would not be able to notice
    it should pause the pipeline and update UI to indicate that is the
    case, the video would likely stutter instead.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=707648
Comment 4 Olivier Crête 2013-09-09 21:20:56 UTC
This patch introduces a crash:

gst-launch-1.0 queue2 use-buffering=1 max-size-buffers=3
Comment 5 Sebastian Dröge (slomo) 2013-09-10 08:07:21 UTC
*** Bug 707772 has been marked as a duplicate of this bug. ***
Comment 6 Sebastian Dröge (slomo) 2013-09-10 08:17:03 UTC
commit b25b9ad6bda052d013a5531f7fe43f84256117b7
Author: Sebastian Dröge <slomo@circular-chaos.org>
Date:   Tue Sep 10 10:15:03 2013 +0200

    queue2: Only update current level if we already downloaded a range
    
    Otherwise queue->level is NULL and dereferencing that is not a good
    idea in general.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=707648
Comment 7 Gustavo Noronha (kov) 2013-09-13 14:16:24 UTC
FWIW, there is some suspicion this patch may have caused issues for aurena - it would simply not play - but I have not been able to reproduce.
Comment 8 Sebastian Dröge (slomo) 2013-09-16 08:31:51 UTC
Gustavo, see bug #707530. Unrelated to this change