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 516246 - [alsasink] handle negative delay from snd_pcm_delay
[alsasink] handle negative delay from snd_pcm_delay
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal normal
: 0.10.18
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-02-13 14:18 UTC by Tommi Myöhänen
Modified: 2008-02-13 14:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gstalsasink.c.delay_patch (571 bytes, patch)
2008-02-13 14:18 UTC, Tommi Myöhänen
committed Details | Review

Description Tommi Myöhänen 2008-02-13 14:18:17 UTC
Delay reported by snd_pcm_delay() may be negative, which isn't handled well by gstringbuffer as it expects it to be unsigned value.
In such case gst_base_audio_sink_get_time() most likely returns 0 as clock time.

Attaching workaround patch to alsasink.
Comment 1 Tommi Myöhänen 2008-02-13 14:18:57 UTC
Created attachment 105146 [details] [review]
gstalsasink.c.delay_patch
Comment 2 Sebastian Dröge (slomo) 2008-02-13 14:28:51 UTC
What exactly does a negative delay mean? Time machine? :)
Comment 3 Wim Taymans 2008-02-13 14:35:49 UTC
I don't know what it means but I would not be surprised when alsa could define this as an underrun or so. Better safe than sorry.

        Patch by: Tommi Myöhänen <ext-tommi dot myohanen at nokia dot com>

        * ext/alsa/gstalsasink.c: (set_hwparams), (gst_alsasink_delay):
        Add some more debug info.
        Make sure we never return a negative delay. Fixes #516246.