X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavdevice%2Fpulse_audio_dec.c;h=50a3c971aee52e8ee41fbf401fe8a7e6a20de7cf;hb=09f1d15ae8bd1d7f597aec9ced4f8ebe8762a4bd;hp=5977fb7e9e5f65914605283fb552767ab9fcdf94;hpb=94d98330ed6c5562341315c26c1af92771a2e6de;p=ffmpeg diff --git a/libavdevice/pulse_audio_dec.c b/libavdevice/pulse_audio_dec.c index 5977fb7e9e5..50a3c971aee 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; } @@ -356,7 +359,7 @@ static const AVOption options[] = { }; static const AVClass pulse_demuxer_class = { - .class_name = "Pulse demuxer", + .class_name = "Pulse indev", .item_name = av_default_item_name, .option = options, .version = LIBAVUTIL_VERSION_INT,