Bug 53923 - pa_sink_input_request_rewind() has a nonsensical check
Summary: pa_sink_input_request_rewind() has a nonsensical check
Status: RESOLVED FIXED
Alias: None
Product: PulseAudio
Classification: Unclassified
Component: core (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: pulseaudio-bugs
QA Contact: pulseaudio-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-22 11:45 UTC by Tanu Kaskinen
Modified: 2012-09-17 14:55 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Removing unecessary check (898 bytes, patch)
2012-09-11 14:05 UTC, Flavio Ceolin
Details | Splinter Review

Description Tanu Kaskinen 2012-08-22 11:45:53 UTC
pa_sink_input_request_rewind() contains this:

    i->thread_info.rewrite_flush =
        i->thread_info.rewrite_flush ||
        (flush && i->thread_info.rewrite_nbytes != 0);

The "i->thread_info.rewrite_nbytes != 0" doesn't do anything useful, so all it does is create confusion (it's otherwise harmless).

It would be good to test the change at least a bit before pushing. I'm not willing to do that right now, which is why I'm filing this bug.
Comment 1 Flavio Ceolin 2012-09-11 14:05:53 UTC
Created attachment 66976 [details] [review]
Removing unecessary check

The patch just remove the i->thread_info.rewrite_nbytes != 0 check.

I've done the follow tests:

1) Moving the sink-input around two different sinks a bluetooth device and my sound card.
2) Cork/Uncork the sink-input in the bluetooth sink
3) Several volume changes

In all these three tests worked as expected.

The bluetooth device used was: Motorola EQ5 portable speaker.

Best Regards,
Flavio Ceolin
Comment 2 Flavio Ceolin 2012-09-13 14:46:05 UTC
Hey folks, is it necessary other tests to validate it ?

Thanks in advance,
Flavio Ceolin
Comment 3 Tanu Kaskinen 2012-09-16 06:51:10 UTC
(In reply to comment #2)
> Hey folks, is it necessary other tests to validate it ?

No, the tests that you've done are fine. The patch is pushed now, sorry for the delay. I changed the commit message a bit to align with usual conventions. Thanks for the patch!
Comment 4 Flavio Ceolin 2012-09-17 14:55:52 UTC
No problem at all, thanks for applying the patch.

Regards,
Flavio Ceolin


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.