[FFmpeg-devel] [PATCH 01/16] vmdaudio: fix raw_block_size calculation.
Tue Feb 22 23:04:42 CET 2011
On date Tuesday 2011-02-22 20:33:56 +0100, Reimar D?ffinger encoded:
> On Tue, Feb 22, 2011 at 08:26:59PM +0100, Michael Niedermayer wrote:
> > On Tue, Feb 22, 2011 at 08:21:20PM +0100, Reimar D?ffinger wrote:
> > > On Tue, Feb 22, 2011 at 02:05:20PM -0500, Justin Ruggles wrote:
> > > > - int raw_block_size = s->block_align * s->bits / 8;
> > > > + int raw_block_size = s->block_align *
> > > > + (av_get_bits_per_sample_fmt(avctx->sample_fmt) / 8);
> > >
> > > WTF is "bits per sample format"? That function really has a braindead name.
> > The number of bits in the given sample format, like 16 for SAMPLE_FMT_S16:
> Yes, I know that, but the function name is "bits per sample format",
> and that makes no sense. There's bits per sample, but not per sample format.
Feel free to deprecate the old name in favor of
av_get_bits_per_sample(), when I created the function I took the old
name (av_get_bits_per_sample_format()), which was a poor choice.
BTW which should be the policy for deprecating functions? I suppose we
could mark them for removal at version N+2 where N is the current
major number, for easing transition (this would also mean that we'll
stay keeping cruft around longer).
FFmpeg = Fiendish & Frightening Marvellous Proud EntanGlement
More information about the ffmpeg-devel