[flac-dev] Are pointers to FLAC__int32 and int interchangeable?

lvqcl lvqcl.mail at gmail.com
Wed Oct 7 12:38:50 PDT 2015


There are following functions in bitreader.c:

FLAC__bool FLAC__bitreader_read_unary_unsigned(FLAC__BitReader *br, unsigned *val);
FLAC__bool FLAC__bitreader_read_rice_signed(FLAC__BitReader *br, int *val, unsigned parameter);
FLAC__bool FLAC__bitreader_read_rice_signed_block(FLAC__BitReader *br, int vals[], unsigned nvals, unsigned parameter);


* function FLAC__bitreader_read_rice_signed(): unused

* function FLAC__bitreader_read_rice_signed_block(): called from
read_residual_partitioned_rice_() with a pointer to FLAC__int32, not to int
(as its 2nd parameter).

* function FLAC__bitreader_read_unary_unsigned(): sometimes it is called with
a pointer to unsigned as its 2nd parameter, sometimes with a pointer to FLAC__uint32.


Is it Ok to pass FLAC__int32* in a function that expects int* ?
(the same question for FLAC__uint32* and unsigned*)


More information about the flac-dev mailing list