[FFmpeg-devel] [PATCH] Add supported_samplerates field to AVCodec

Michael Niedermayer michaelni
Tue Apr 22 20:04:15 CEST 2008


On Mon, Apr 21, 2008 at 11:46:28PM +0200, Stefano Sabatini wrote:
> On date Monday 2008-04-21 19:11:13 +0200, Michael Niedermayer encoded:
> > On Mon, Apr 21, 2008 at 05:51:25PM +0200, Stefano Sabatini wrote:
> [...]
> > > > > +    const int *supported_samplerates;       ///< array of supported audio samplerates, or NULL if unknown, array is terminated by -1
> > > > 
> > > > i would prefer if the array where terminated by 0
> > > 
> > > I don't like this solution, in this way we can't distinguish if a
> > > codec doesn't support a certain value or if we don't know or we don't
> > > want to specify the valid values.
> > > 
> > > For example suppose we define a common function which checks if the
> > > provided value for the samplerate is valid looking at the
> > > supported_samplerates value, if it is set to NULL then the check is
> > > skipped and will be eventually executed in the open_codec function,
> > > while if the value is set to -1 (empty list of valid values) then it
> > > will always fail.
> > 
> > Learn C, especially the difference between pointer and pointed to value.
> 
> My bad, sorry for the misunderstanding.
> 
> New patch attached, regards.

looks ok

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

Opposition brings concord. Out of discord comes the fairest harmony.
-- Heraclitus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080422/2cf011a4/attachment.pgp>



More information about the ffmpeg-devel mailing list