Message ID | 20240309182752.3204466-2-marth64@proxyid.net |
---|---|
State | New |
Headers | show |
Series | avformat/dvdvideodec: various improvements | expand |
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
diff --git a/libavformat/dvdvideodec.c b/libavformat/dvdvideodec.c index b3cc32b864..ca85aa8d3d 100644 --- a/libavformat/dvdvideodec.c +++ b/libavformat/dvdvideodec.c @@ -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;
Signed-off-by: Marth64 <marth64@proxyid.net> --- libavformat/dvdvideodec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)