On Wed, 8 May 2024, shiqizhu wrote:

Signed-off-by: shiqizhu <hiccup...@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);

Why do you assume that the default layout is suitable here? A demuxer should not guess the channel layout, if the format does not provide any information about it.

Regards,
Marton
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to