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 788529 - pulsesink: playing after EOS causes a gap in playback after seek
pulsesink: playing after EOS causes a gap in playback after seek
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-10-04 18:24 UTC by mkid.dev
Modified: 2018-11-03 15:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Scenario file for gst-validate (184 bytes, text/plain)
2017-10-04 18:24 UTC, mkid.dev
Details

Description mkid.dev 2017-10-04 18:24:39 UTC
Created attachment 360920 [details]
Scenario file for gst-validate

If after EOS playing state of pipeline is maintain, PulseAudio still wants to render client's data and calls request callback. pulsesink doesn't have data to write, thus PulseAudio render "silence". If after some waiting time (e.g. 30 seconds), GStreamer's client seeks (e.g. to 0), a user will hear proper playback for a while (e.g. 12 seconds), than "silence" will be rendered by PulseAudio till stream time doesn't reach waiting time (earlier mentioned 30 seconds).

To reproduce, please run command with attached scenario file:
gst-validate-1.0 --set-scenario=brainson.scenario uridecodebin uri=https://play.podtrac.com/APM-BrainsOn/play.publicradio.org/itunes/d/podcast/minnesota/podcasts/brains_on/2017/02/brainson_20170214_69_20170214_64.mp3 ! autoaudiosink

It seems that:
- pulsesink calculates absolute offset in PulseAudio's client buffer based on running (?) time,
- PulseAudio doesn't increase write index, when silence is rendered (samples for silence are stored in separate memory block), i.e. underrun is happened,
- PulseAudio doesn't correct write index, if data are provided after silence,
- PulseAudio increases read index during silence.

IMHO pulsesink expects that PulseSink' read index should not be increased or write index will be rewind to position of read index after underrun.
Comment 1 mkid.dev 2017-10-04 19:13:10 UTC
I reported a problem in PulseAudio's bugtracker: https://bugs.freedesktop.org/show_bug.cgi?id=103103, because it is possible that the problem can have a source in PulseAudio.

What is missing in my bug report here (I can't edit it) is a fact, that pulsesink is blocked due to lack of space in client buffer and woken after almost 30 seconds - pulsesink very quickly provides data for ~12 seconds of playback than PulseAudio generates 18 seconds of silence.

Values 12 and 18 can vary for attached scenario, but can sum up to 30 seconds (e.g. 9/21 etc.).
Comment 2 mkid.dev 2017-11-07 13:53:55 UTC
It is currently confirmed that the problem lays in PulseAudio - https://bugs.freedesktop.org/show_bug.cgi?id=103103#c16. Thus from GStreamer's point of view it is not a bug, but I want to keep the report open to be able add information, which version of PulseAudio will fix the problem.
Comment 3 GStreamer system administrator 2018-11-03 15:22:47 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/409.