[FFmpeg-devel] [PATCH] avformat/riffdec: add ch_layout used av_channel_layout_default.
shiqizhu
hiccupzhu at gmail.com
Thu May 9 05:28:18 EEST 2024
Signed-off-by: shiqizhu <hiccupzhu at gmail.com>
---
libavformat/riffdec.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/libavformat/riffdec.c b/libavformat/riffdec.c
index b7a85a6ab2..89267e879d 100644
--- a/libavformat/riffdec.c
+++ b/libavformat/riffdec.c
@@ -197,8 +197,7 @@ int ff_get_wav_header(void *logctx, AVIOContext *pb,
/* ignore WAVEFORMATEXTENSIBLE layout if different from channel count */
if (channels != par->ch_layout.nb_channels) {
av_channel_layout_uninit(&par->ch_layout);
- par->ch_layout.order = AV_CHANNEL_ORDER_UNSPEC;
- par->ch_layout.nb_channels = channels;
+ av_channel_layout_default(&par->ch_layout, channels);
}
return 0;
--
2.34.1
More information about the ffmpeg-devel
mailing list