[FFmpeg-devel] [PATCH 1/4] avformat/movenc: fix channel count and samplerate fields for IAMF tracks
James Almer
jamrial at gmail.com
Wed Jul 17 14:29:28 EEST 2024
On 7/17/2024 3:18 AM, Anton Khirnov wrote:
> 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
Ok, changed locally.
More information about the ffmpeg-devel
mailing list