diff --git a/libavformat/gxf.c b/libavformat/gxf.c index 6f370c1b57..d96e0796f4 100644 --- a/libavformat/gxf.c +++ b/libavformat/gxf.c @@ -143,8 +143,7 @@ static int get_sindex(AVFormatContext *s, int id, int format) { case 9: st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO; st->codecpar->codec_id = AV_CODEC_ID_PCM_S24LE; - st->codecpar->channels = 1; - st->codecpar->channel_layout = AV_CH_LAYOUT_MONO; + st->codecpar->ch_layout = (AVChannelLayout)AV_CHANNEL_LAYOUT_MONO; st->codecpar->sample_rate = 48000; st->codecpar->bit_rate = 3 * 1 * 48000 * 8; st->codecpar->block_align = 3 * 1; @@ -153,8 +152,7 @@ static int get_sindex(AVFormatContext *s, int id, int format) { case 10: st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO; st->codecpar->codec_id = AV_CODEC_ID_PCM_S16LE; - st->codecpar->channels = 1; - st->codecpar->channel_layout = AV_CH_LAYOUT_MONO; + st->codecpar->ch_layout = (AVChannelLayout)AV_CHANNEL_LAYOUT_MONO; st->codecpar->sample_rate = 48000; st->codecpar->bit_rate = 2 * 1 * 48000 * 8; st->codecpar->block_align = 2 * 1; @@ -163,8 +161,7 @@ static int get_sindex(AVFormatContext *s, int id, int format) { case 17: st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO; st->codecpar->codec_id = AV_CODEC_ID_AC3; - st->codecpar->channels = 2; - st->codecpar->channel_layout = AV_CH_LAYOUT_STEREO; + st->codecpar->ch_layout = (AVChannelLayout)AV_CHANNEL_LAYOUT_STEREO; st->codecpar->sample_rate = 48000; break; case 26: /* AVCi50 / AVCi100 (AVC Intra) */ diff --git a/libavformat/gxfenc.c b/libavformat/gxfenc.c index 133d1e9fb3..e25d8764ba 100644 --- a/libavformat/gxfenc.c +++ b/libavformat/gxfenc.c @@ -714,7 +714,7 @@ static int gxf_write_header(AVFormatContext *s) av_log(s, AV_LOG_ERROR, "only 48000hz sampling rate is allowed\n"); return -1; } - if (st->codecpar->channels != 1) { + if (st->codecpar->ch_layout.nb_channels != 1) { av_log(s, AV_LOG_ERROR, "only mono tracks are allowed\n"); return -1; }