[vlc-commits] PulseAudio: disable fix-rate when negotiating pass-through (refs #9309)
Rémi Denis-Courmont
git at videolan.org
Wed Sep 4 20:37:17 CEST 2013
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Sep 4 21:36:36 2013 +0300| [2ff2139198ffec4f6184c9d1c7efe71dcf7fae11] | committer: Rémi Denis-Courmont
PulseAudio: disable fix-rate when negotiating pass-through (refs #9309)
API design bug in PulseAudio...
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2ff2139198ffec4f6184c9d1c7efe71dcf7fae11
---
modules/audio_output/pulse.c | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/modules/audio_output/pulse.c b/modules/audio_output/pulse.c
index 1fe79cc..b477740 100644
--- a/modules/audio_output/pulse.c
+++ b/modules/audio_output/pulse.c
@@ -794,12 +794,12 @@ static int Start(audio_output_t *aout, audio_sample_format_t *restrict fmt)
}
/* Stream parameters */
- const pa_stream_flags_t flags = sys->flags_force
- | PA_STREAM_START_CORKED
- | PA_STREAM_INTERPOLATE_TIMING
- | PA_STREAM_NOT_MONOTONIC
- | PA_STREAM_AUTO_TIMING_UPDATE
- | PA_STREAM_FIX_RATE;
+ pa_stream_flags_t flags = sys->flags_force
+ | PA_STREAM_START_CORKED
+ | PA_STREAM_INTERPOLATE_TIMING
+ | PA_STREAM_NOT_MONOTONIC
+ | PA_STREAM_AUTO_TIMING_UPDATE
+ | PA_STREAM_FIX_RATE;
struct pa_buffer_attr attr;
attr.maxlength = -1;
@@ -831,6 +831,12 @@ static int Start(audio_output_t *aout, audio_sample_format_t *restrict fmt)
pa_format_info_set_channels(formatv[formatc], ss.channels);
pa_format_info_set_channel_map(formatv[formatc], &map);
formatc++;
+
+ /* FIX flags are only permitted for PCM, and there is no way to pass
+ * different flags for different formats... */
+ flags &= ~(PA_STREAM_FIX_FORMAT
+ | PA_STREAM_FIX_RATE
+ | PA_STREAM_FIX_CHANNELS);
}
/* Fallback to PCM */
More information about the vlc-commits
mailing list