[FFmpeg-devel] [PATCH 1/4] avformat/movenc: fix channel count and samplerate fields for IAMF tracks
Anton Khirnov
anton at khirnov.net
Wed Jul 17 09:18:07 EEST 2024
Quoting James Almer (2024-07-17 03:49:22)
> diff --git a/libavformat/movenc.c b/libavformat/movenc.c
> index 2bea55e33d..5de188f4cf 100644
> --- a/libavformat/movenc.c
> +++ b/libavformat/movenc.c
> @@ -1399,6 +1399,11 @@ static int mov_write_audio_tag(AVFormatContext *s, AVIOContext *pb, MOVMuxContex
> avio_wb16(pb, 16);
> avio_wb16(pb, track->audio_vbr ? -2 : 0); /* compression ID */
> } else { /* reserved for mp4/3gp */
> +#if CONFIG_IAMFENC
> + if (track->tag == MKTAG('i','a','m','f'))
> + avio_wb16(pb, 0); /* channelcount must be 0 for IAMF */
> + else
> +#endif
> avio_wb16(pb, track->par->ch_layout.nb_channels);
avio_wb16(pb, track->tag == MKTAG('i', 'a', 'm', 'f') ?
0 : track->par->ch_layout.nb_channels);
looks more readable to me
--
Anton Khirnov
More information about the ffmpeg-devel
mailing list