GNOME Bugzilla – Bug 516246
[alsasink] handle negative delay from snd_pcm_delay
Last modified: 2008-02-13 14:35:49 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.
Created attachment 105146 [details] [review] gstalsasink.c.delay_patch
What exactly does a negative delay mean? Time machine? :)
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.