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 414684 - GStreamer sometimes skips first samples of audio
GStreamer sometimes skips first samples of audio
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: dont know
0.10.x
Other Linux
: Normal blocker
: 0.10.12
Assigned To: Wim Taymans
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-03-04 20:05 UTC by Alexander “weej” Jones
Modified: 2007-03-06 15:39 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18


Attachments
patch (3.36 KB, patch)
2007-03-06 08:33 UTC, Wim Taymans
none Details | Review
updated patch with only the relevant bits (745 bytes, patch)
2007-03-06 10:22 UTC, Wim Taymans
committed Details | Review

Description Alexander “weej” Jones 2007-03-04 20:05:50 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.
Comment 1 Alexander “weej” Jones 2007-03-04 20:06:44 UTC
Should also note that this is not specific to filesrc. I have tested gnomevfssrc with file and HTTP URIs, and this made no difference.
Comment 2 Wim Taymans 2007-03-06 08:24:44 UTC
Has this always been the case or new in CVS?
Comment 3 Wim Taymans 2007-03-06 08:33:05 UTC
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.
Comment 4 Tim-Philipp Müller 2007-03-06 09:39:02 UTC
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.

Comment 5 Jan Schmidt 2007-03-06 10:16:51 UTC
What's with the audiosrc bits of the patch? Is that accidental?
Comment 6 Wim Taymans 2007-03-06 10:22:15 UTC
Created attachment 84046 [details] [review]
updated patch with only the relevant bits

no, sorry. Updated patch attached.
Comment 7 Jan Schmidt 2007-03-06 10:37:34 UTC
OK, commit it. Also, damn you for making me make another pre-release.
Comment 8 Wim Taymans 2007-03-06 12:10:26 UTC
        * 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.
Comment 9 Alexander “weej” Jones 2007-03-06 15:39:19 UTC
Well done guys, thanks! :)

Tim, I use Feisty, not Edgy. Sorry if I misled you!