summaryrefslogtreecommitdiffstats
path: root/libavdevice
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2018-09-12 22:17:52 +0200
committerPaul B Mahol <onemda@gmail.com>2018-09-14 22:12:54 +0200
commit6a467d432f9228bec6f1cfeb2767f7e94c29f661 (patch)
treec1cdd5501eddcaadb07e29de32686be7eda4a7c2 /libavdevice
parent0d7e0f25caa0c460106a53f8bb09468894dc1632 (diff)
downloadffmpeg-streaming-6a467d432f9228bec6f1cfeb2767f7e94c29f661.zip
ffmpeg-streaming-6a467d432f9228bec6f1cfeb2767f7e94c29f661.tar.gz
avdevice/pulse_audio_dec: set channel map
This fixes opening devices with >6 channels.
Diffstat (limited to 'libavdevice')
-rw-r--r--libavdevice/pulse_audio_dec.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavdevice/pulse_audio_dec.c b/libavdevice/pulse_audio_dec.c
index 5977fb7..042fe76 100644
--- a/libavdevice/pulse_audio_dec.c
+++ b/libavdevice/pulse_audio_dec.c
@@ -148,6 +148,9 @@ static av_cold int pulse_read_header(AVFormatContext *s)
pd->channels };
pa_buffer_attr attr = { -1 };
+ pa_channel_map cmap;
+
+ pa_channel_map_init_extend(&cmap, pd->channels, PA_CHANNEL_MAP_WAVEEX);
st = avformat_new_stream(s, NULL);
@@ -202,7 +205,7 @@ static av_cold int pulse_read_header(AVFormatContext *s)
pa_threaded_mainloop_wait(pd->mainloop);
}
- if (!(pd->stream = pa_stream_new(pd->context, pd->stream_name, &ss, NULL))) {
+ if (!(pd->stream = pa_stream_new(pd->context, pd->stream_name, &ss, &cmap))) {
ret = AVERROR(pa_context_errno(pd->context));
goto unlock_and_fail;
}
OpenPOWER on IntegriCloud