[FFmpeg-devel] [PATCH] avformat/wavdec: change ch_layout used av_channel_layout_default.
shiqizhu
hiccupzhu at gmail.com
Wed May 8 12:24:53 EEST 2024
Signed-off-by: shiqizhu <hiccupzhu at gmail.com>
---
libavformat/wavdec.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/libavformat/wavdec.c b/libavformat/wavdec.c
index 00856a5eca..9060796c81 100644
--- a/libavformat/wavdec.c
+++ b/libavformat/wavdec.c
@@ -233,8 +233,7 @@ static int wav_parse_xma2_tag(AVFormatContext *s, int64_t size, AVStream *st)
avio_skip(pb, 3);
}
av_channel_layout_uninit(&st->codecpar->ch_layout);
- st->codecpar->ch_layout.order = AV_CHANNEL_ORDER_UNSPEC;
- st->codecpar->ch_layout.nb_channels = channels;
+ av_channel_layout_default(&st->codecpar->ch_layout, channels);
if (st->codecpar->ch_layout.nb_channels <= 0 || st->codecpar->sample_rate <= 0)
return AVERROR_INVALIDDATA;
--
2.34.1
More information about the ffmpeg-devel
mailing list