[Ffmpeg-devel] [PATCH] Remove "bufsize" OptionDef option

Michael Niedermayer michaelni
Sat Sep 16 23:58:46 CEST 2006


Hi

On Sat, Sep 16, 2006 at 10:33:12PM +0200, Dominik 'Rathann' Mierzejewski wrote:
> On Saturday, 16 September 2006 at 21:38, Rich Felker wrote:
> > On Sat, Sep 16, 2006 at 09:23:34AM +0200, Panagiotis Issaris wrote:
> > > Hi,
> > > 
> > > On za, 2006-09-16 at 01:11 +0200, Michael Niedermayer wrote:
> > > >[...]
> > > > > The attached patch removes the "bufsize" OptionDef option from the
> > > > > ffmpeg.c file. The equally named "bufsize" AVOption takes over its
> > > > > function and this occurs transparantly with the exception of the
> > > > > parameter unit change. Regression tests succeed.
> > > > > 
> > > > > So, this is yet another case where the unit of a commandline unit is
> > > > > changed, this time from from kilobytes to bits. Using the postfix "kB"
> > > > > eases the situation:
> > > > > * Before this patch:
> > > > >     ffmpeg -i src.ext -bufsize 224 dst.ext
> > > > > * After this patch:
> > > > >     ffmpeg -i src.ext -bufsize 224kB dst.ext
> > > > 
> > > > no this is not the same theres a 1000/1024 difference
> > > 
> > > Oops. You are right. Sorry about that. 
> > > 
> > > So, it seems we really do need the kiB postfix. I'll have a try at that.
> > 
> > Uhg....
> 
> Ugh indeed. KB=1024B kB=1000B. With M it gets tricky.
> I'd say it should support only SI or only binary prefixes, but not both.
> And don't get me started with "mebibytes".

after thinking about this a little id suggest
123E3 = 123 * 10^3 and 123P10 = 123 * 2^10 notation, this is also almost
supported by strtod
this would free KBM* which we could either drop or leave it at the SI units

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is




More information about the ffmpeg-devel mailing list