[FFmpeg-devel] [PATCH v3 3/5] avformat/mov: parse ISO-14496-12 ChannelLayout
"zhilizhao(赵志立)"
quinkblack at foxmail.com
Tue Mar 7 04:27:44 EET 2023
> On Mar 6, 2023, at 20:26, Tomas Härdin <git at haerdin.se> wrote:
>
>> +int ff_mov_get_channel_config_from_layout(const AVChannelLayout
>> *layout, int *config)
>> +{
>> + // Set default value which means any setup in 23001-8
>> + *config = 0;
>> + for (int i = 0; i < FF_ARRAY_ELEMS(iso_channel_configuration);
>> i++) {
>> + if (!av_channel_layout_compare(layout,
>> iso_channel_configuration + i)) {
>> + *config = i;
>> + break;
>> + }
>> + }
>> +
>> + return 0;
>
> Is always returning 0 intended? If so then what is the point?
> ff_mov_get_channel_positions_from_layout() returns non-zero on error..
As the comments says, ChannelConfiguration 0 means “any setup”. If no
iso_channel_configuration item match layout, *config get 0 as a valid
value.
Current implementation of the function doesn’t fail, but it might in
future.
>
> /Tomas
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
More information about the ffmpeg-devel
mailing list