GNOME Bugzilla – Bug 414684
GStreamer sometimes skips first samples of audio
Last modified: 2007-03-06 15:39:19 UTC
Test case: gst-launch-0.10 filesrc location="Desktop/test.ogg" ! decodebin ! audioconvert ! alsasink This manifests itself in every GStreamer media player. Skipping tracks in Rhythmbox gives a good chance of it happening. Sometimes it doesn't skip, sometimes it skips up to what sounds like maybe a quarter of a second. Totem has the same odds. Interestingly, Pausing either of these players and seeking to the beginning of a track causes the skip consistently, without fail. This may be another bug. Of course, you only notice this for tracks with audio right at the start of their streams. Here is a test track that you can use: http://djlxj.com/tracks/files/Thrillseekers%20-%20Synaesthesia%20%5bLXJ%20Remix%5d.ogg The beginning of the audio is very close to zero, so playing this file properly should give no pop at the beginning, but a clear kick drum, instead. In many cases, the peak of the kick drum is skipped entirely. Have tested this with ice1712 and emu10k1 ALSA output drivers, with or without ALSA plug, and with files of MP3, Ogg Vorbis and FLAC formats.
Should also note that this is not specific to filesrc. I have tested gnomevfssrc with file and HTTP URIs, and this made no difference.
Has this always been the case or new in CVS?
Created attachment 84041 [details] [review] patch This patch fixes the fact that the ringbuffer is started too soon in the case of non-slaved playback. This was recently introduced in CVS and causes us to send samples to the audio device before we received them, resulting in silence.
On IRC the reporter said this was with versions as in ubuntu edgy (ie. core/base 0.10.10). In any case, the patch fixes the issue for me.
What's with the audiosrc bits of the patch? Is that accidental?
Created attachment 84046 [details] [review] updated patch with only the relevant bits no, sorry. Updated patch attached.
OK, commit it. Also, damn you for making me make another pre-release.
* gst-libs/gst/audio/gstbaseaudiosink.c: (gst_base_audio_sink_async_play): Fix regression that made GStreamer skip the first samples of audio. Fixes #414684.
Well done guys, thanks! :) Tim, I use Feisty, not Edgy. Sorry if I misled you!