avformat/iamf_writer: fix writting some ambisonics fields in Audio Elements

The fields are defined as 8 bit long unsigned ints. Fortunately, writing most sane values
as leb is equivalent, which is why no tests are affected.

Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit 21ff60d2cf)
This commit is contained in:
James Almer
2025-12-27 18:06:32 -03:00
parent af60dd8419
commit 06fcee2e26

View File

@@ -662,8 +662,8 @@ static int ambisonics_config(const IAMFAudioElement *audio_element,
const AVIAMFLayer *layer = element->layers[0];
ffio_write_leb(dyn_bc, 0); // ambisonics_mode
ffio_write_leb(dyn_bc, layer->ch_layout.nb_channels); // output_channel_count
ffio_write_leb(dyn_bc, audio_element->nb_substreams); // substream_count
avio_w8(dyn_bc, layer->ch_layout.nb_channels); // output_channel_count
avio_w8(dyn_bc, audio_element->nb_substreams); // substream_count
if (layer->ch_layout.order == AV_CHANNEL_ORDER_AMBISONIC)
for (int i = 0; i < layer->ch_layout.nb_channels; i++)