Signed-off-by: shiqizhu <[email protected]>
---
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
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".