1
0
Fork 0

avformat/dvdvideodec: assign mono channel layout explicitly

Signed-off-by: Marth64 <marth64@proxyid.net>
This commit is contained in:
Marth64 2024-03-09 12:27:50 -06:00 committed by Stefano Sabatini
parent ac61231757
commit ffc3f2a350
1 changed files with 3 additions and 1 deletions

View File

@ -932,7 +932,9 @@ static int dvdvideo_audio_stream_analyze(AVFormatContext *s, audio_attr_t audio_
return AVERROR_INVALIDDATA;
}
if (nb_channels == 2)
if (nb_channels == 1)
ch_layout = (AVChannelLayout) AV_CHANNEL_LAYOUT_MONO;
else if (nb_channels == 2)
ch_layout = (AVChannelLayout) AV_CHANNEL_LAYOUT_STEREO;
else if (nb_channels == 6)
ch_layout = (AVChannelLayout) AV_CHANNEL_LAYOUT_5POINT1;