diff --git a/libavformat/smjpegdec.c b/libavformat/smjpegdec.c index dc95a822c5..02d0f29b99 100644 --- a/libavformat/smjpegdec.c +++ b/libavformat/smjpegdec.c @@ -94,7 +94,7 @@ static int smjpeg_read_header(AVFormatContext *s) ast->codecpar->codec_type = AVMEDIA_TYPE_AUDIO; ast->codecpar->sample_rate = avio_rb16(pb); ast->codecpar->bits_per_coded_sample = avio_r8(pb); - ast->codecpar->channels = avio_r8(pb); + ast->codecpar->ch_layout.nb_channels = avio_r8(pb); ast->codecpar->codec_tag = avio_rl32(pb); ast->codecpar->codec_id = ff_codec_get_id(ff_codec_smjpeg_audio_tags, ast->codecpar->codec_tag); diff --git a/libavformat/smjpegenc.c b/libavformat/smjpegenc.c index ac5576fa76..8b40c09329 100644 --- a/libavformat/smjpegenc.c +++ b/libavformat/smjpegenc.c @@ -68,7 +68,7 @@ static int smjpeg_write_header(AVFormatContext *s) avio_wb32(pb, 8); avio_wb16(pb, par->sample_rate); avio_w8(pb, par->bits_per_coded_sample); - avio_w8(pb, par->channels); + avio_w8(pb, par->ch_layout.nb_channels); avio_wl32(pb, tag); avpriv_set_pts_info(st, 32, 1, 1000); } else if (par->codec_type == AVMEDIA_TYPE_VIDEO) {