Bug 51719

Summary: pa_sink_input_new() assumes that data->sample_spec is valid.
Product: PulseAudio Reporter: Tanu Kaskinen <tanuk>
Component: coreAssignee: pulseaudio-bugs
Status: RESOLVED MOVED QA Contact: pulseaudio-bugs
Severity: normal    
Priority: medium CC: lennart
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Tanu Kaskinen 2012-07-04 06:10:45 UTC
If the sink input new data has all PA_SINK_INPUT_FIX_* flags set, then pa_sink_input_new() should ignore the sample spec and channel map of the sink input new data. That's not currently the case: at least pa_format_info_from_sample_spec() is called with data->sample_spec as the parameter, and that will crash if the sample spec is not valid.

One part of this problem is that it's not possible to set only one of sample format and sample rate in pa_sink_input_new_data. This is a problem at least with module-loopback: it accepts the "format" and "rate" module arguments, and it's a perfectly reasonable thing for the user to set only one of them. If the user sets only the sample rate, for example, then it should be possible for module-loopback to only set the rate in pa_sink_input_new_data and leave the format unspecified.

There's a FIXME item related to this, search for "FIXME" in this commit diff: http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/?id=c6d8d1d7c19a105b224eac393e44bae319897b6b

(The same issue exists for source outputs too.)
Comment 1 GitLab Migration User 2018-07-30 10:13:21 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/pulseaudio/pulseaudio/issues/278.

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.