From: Anton Khirnov <anton@khirnov.net>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH 001/293 v8] avutil/channel_layout: Add a new channel layout API
Date: Mon, 31 Jan 2022 14:27:38 +0100
Message-ID: <164363565831.23111.2139997009459012752@lain.red.khirnov.net> (raw)
In-Reply-To: <YfK1WsBwwRcpr6k2@phare.normalesup.org>
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-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply other threads:[~2022-01-31 13:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-24 20:46 James Almer
2022-01-24 21:08 ` Marton Balint
2022-01-24 21:21 ` James Almer
2022-01-27 15:08 ` Nicolas George
2022-01-31 13:27 ` Anton Khirnov [this message]
2022-03-16 0:41 ` Michael Niedermayer
2022-03-16 2:00 ` James Almer
2022-03-17 19:39 ` Michael Niedermayer
2022-03-17 19:46 ` James Almer
2022-03-17 19:51 ` James Almer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=164363565831.23111.2139997009459012752@lain.red.khirnov.net \
--to=anton@khirnov.net \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git