Quoting Nicolas George (2022-01-27 16:08:10) > > + * be checked) > > + * > > + * No new fields may be added to it without a major version bump, except > > for > > + * new elements of the union fitting in sizeof(uint64_t). > > + */ > > +typedef struct AVChannelLayout { > > + /** > > + * Channel order used in this layout. > > + * This is a mandatory field. > > + */ > > + enum AVChannelOrder order; > > + > > + /** > > + * Number of channels in this layout. Mandatory field. > > + */ > > > + int nb_channels; > > If it does not make sense to have a negative value, then unsigned is > preferable.
We discussed this already a year ago or so. IIRC the conclusion was that channels counts are signed everywhere and making this one unsigned adds a danger of unexpected conversions. > I would really like you to consider the option of refcounting. I think > it would be more convenient and more robust for the future. I considered refcounting back in 2013 when I wrote the original version of this API and decided against; I still stand by that decision. But I assure you this option was considered. -- Anton Khirnov _______________________________________________ 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".