summaryrefslogtreecommitdiffstats
path: root/demux/demux_lavf.c
diff options
context:
space:
mode:
Diffstat (limited to 'demux/demux_lavf.c')
-rw-r--r--demux/demux_lavf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/demux/demux_lavf.c b/demux/demux_lavf.c
index e11d28c043..279f7f7b33 100644
--- a/demux/demux_lavf.c
+++ b/demux/demux_lavf.c
@@ -340,7 +340,9 @@ static void handle_stream(demuxer_t *demuxer, int i)
sh_audio->format = codec->codec_tag;
// probably unneeded
- sh_audio->channels = codec->channels;
+ mp_chmap_from_channels(&sh_audio->channels, codec->channels);
+ if (codec->channel_layout)
+ mp_chmap_from_lavc(&sh_audio->channels, codec->channel_layout);
sh_audio->samplerate = codec->sample_rate;
sh_audio->i_bps = codec->bit_rate / 8;