libFLAC : new function returns client_data from decoder

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
This commit is contained in:
Christophe DUMONT 2017-12-04 11:38:37 +01:00 committed by Erik de Castro Lopo
parent 972454edf8
commit a0027fadfa
2 changed files with 10 additions and 0 deletions

View File

@ -57,4 +57,9 @@ typedef struct FLAC__StreamDecoderProtected {
*/
uint32_t FLAC__stream_decoder_get_input_bytes_unconsumed(const FLAC__StreamDecoder *decoder);
/*
* return client_data from decoder
*/
FLAC_API void *get_client_data_from_decoder(FLAC__StreamDecoder *decoder);
#endif

View File

@ -3395,3 +3395,8 @@ FLAC__bool file_eof_callback_(const FLAC__StreamDecoder *decoder, void *client_d
return feof(decoder->private_->file)? true : false;
}
void *get_client_data_from_decoder(FLAC__StreamDecoder *decoder)
{
return decoder->private_->client_data;
}