Signed-off-by: Vittorio Giovara <[email protected]>
---
libavformat/au.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/libavformat/au.c b/libavformat/au.c
index 20c9d41f47..e1df580d4c 100644
--- a/libavformat/au.c
+++ b/libavformat/au.c
@@ -111,7 +111,8 @@ static int au_read_header(AVFormatContext *s)
st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
st->codecpar->codec_tag = id;
st->codecpar->codec_id = codec;
- st->codecpar->channels = channels;
+ st->codecpar->ch_layout.order = AV_CHANNEL_ORDER_UNSPEC;
+ st->codecpar->ch_layout.nb_channels = channels;
st->codecpar->sample_rate = rate;
st->codecpar->bit_rate = channels * rate * bps;
st->codecpar->block_align = channels * bps >> 3;
@@ -167,7 +168,7 @@ static int put_au_header(AVIOContext *pb, AVCodecParameters
*par)
avio_wb32(pb, AU_UNKNOWN_SIZE); /* data size */
avio_wb32(pb, par->codec_tag); /* codec ID */
avio_wb32(pb, par->sample_rate);
- avio_wb32(pb, par->channels);
+ avio_wb32(pb, par->ch_layout.nb_channels);
return 0;
}
--
2.12.0
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel