[FFmpeg-cvslog] avformat/dvdvideodec: assign mono channel layout explicitly
Marth64
git at videolan.org
Sun Mar 10 16:21:34 EET 2024
ffmpeg | branch: master | Marth64 <marth64 at proxyid.net> | Sat Mar 9 12:27:50 2024 -0600| [ffc3f2a3501003b11f882ae3d2bc72b20536ad9b] | committer: Stefano Sabatini
avformat/dvdvideodec: assign mono channel layout explicitly
Signed-off-by: Marth64 <marth64 at proxyid.net>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ffc3f2a3501003b11f882ae3d2bc72b20536ad9b
---
libavformat/dvdvideodec.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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;
More information about the ffmpeg-cvslog
mailing list