[pulseaudio-tickets] [Bug 54251] New: protocol-esound, protocol-simple: Rewind after underrun can be too large

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Aug 30 01:29:52 PDT 2012


https://bugs.freedesktop.org/show_bug.cgi?id=54251

             Bug #: 54251
           Summary: protocol-esound, protocol-simple: Rewind after
                    underrun can be too large
    Classification: Unclassified
           Product: PulseAudio
           Version: unspecified
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: core
        AssignedTo: pulseaudio-bugs at lists.freedesktop.org
        ReportedBy: tanuk at iki.fi
         QAContact: pulseaudio-bugs at lists.freedesktop.org
                CC: lennart at poettering.net


Rewinding after an underrun should be done like this:

pa_sink_input_request_rewind(s->sink_input, (size_t)
(s->sink_input->thread_info.underrun_for == (uint64_t) -1 ? 0 :
s->sink_input->thread_info.underrun_for), FALSE, TRUE, FALSE);

(The example is from protocol-native.c.)

That ensures that the received data won't overwrite valid data in case the
underrun was so short that the sink still has data left from time before the
underrun started.

protocol-esound.c currently does this:

pa_sink_input_request_rewind(c->sink_input, 0, FALSE, TRUE, FALSE);

Giving zero as the rewind amount means that a full rewind will be done,
regardless of whether valid data might get overwritten. If valid data gets
overwritten, there will be a skip in the audio.

protocol-simple.c has the same bug.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the pulseaudio-bugs mailing list