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 646570 - baseaudiosink: don't allow aligning behind the read-segment
baseaudiosink: don't allow aligning behind the read-segment
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other All
: Normal critical
: 0.10.33
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-04-02 21:22 UTC by Håvard Graff (hgr)
Modified: 2011-04-04 07:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (4.40 KB, patch)
2011-04-02 21:22 UTC, Håvard Graff (hgr)
committed Details | Review

Description Håvard Graff (hgr) 2011-04-02 21:22:06 UTC
Created attachment 184986 [details] [review]
patch

Given a large enough drift-tolerance, one could end up in a situation
where one would keep aligning the written buffers behind the current
read-segment position. The result for the reader would be complete
silence, possible preceded by very choppy audio.

By checking the available headroom, one can determine if there is
room to do alignment, or if one should resort to a resync instead to get
the pointers back on track.

Also refactor the alignment-logic out of the render function for cleaner
code.

NOTE: I saw that the discont-message had been made into a non-warning. I changed that back, since a discont will *always* become a glitch in the audio, and any self-respecting application should try to avoid these, and would want to be notified when it happens.
Comment 1 Sebastian Dröge (slomo) 2011-04-04 07:32:06 UTC
commit 588ac0ae6fdfb55c612cc84f5426cbf1ee4aec4e
Author: Havard Graff <havard.graff@tandberg.com>
Date:   Tue Feb 8 18:27:43 2011 +0100

    baseaudiosink: don't allow aligning behind the read-segment
    
    Given a large enough drift-tolerance, one could end up in a situation
    where one would keep aligning the written buffers behind the current
    read-segment position. The result for the reader would be complete
    silence, possible preceded by very choppy audio.
    
    By checking the available headroom, one can determine if there is
    room to do alignment, or if one should resort to a resync instead to get
    the pointers back on track.
    
    Also refactor the alignment-logic out of the render function for cleaner
    code.