> On Mar 6, 2023, at 20:26, Tomas Härdin <g...@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@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".