search for: flac__streamdecod

Displaying 20 results from an estimated 59 matches for "flac__streamdecod".

Did you mean: flac__streamdecoder
2014 Sep 25
2
Patch to improve malformed vorbiscomment handling
...STATUS_SEEK_ERROR; } return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OK; diff --git a/src/libFLAC/stream_decoder.c b/src/libFLAC/stream_decoder.c index fac73f3..604f6ea 100644 --- a/src/libFLAC/stream_decoder.c +++ b/src/libFLAC/stream_decoder.c @@ -87,7 +87,7 @@ static FLAC__bool find_metadata_(FLAC__StreamDecoder *decoder); static FLAC__bool read_metadata_(FLAC__StreamDecoder *decoder); static FLAC__bool read_metadata_streaminfo_(FLAC__StreamDecoder *decoder, FLAC__bool is_last, unsigned length); static FLAC__bool read_metadata_seektable_(FLAC__StreamDecoder *decoder, FLAC__bool is_last, unsigned lengt...
2014 Jun 19
0
[PATCH] stream_encoder : Improve selection of residual accumulator width
...nks, -- Miroslav Lichvar -------------- next part -------------- diff --git a/src/libFLAC/stream_decoder.c b/src/libFLAC/stream_decoder.c index ddd8979..82318ae 100644 --- a/src/libFLAC/stream_decoder.c +++ b/src/libFLAC/stream_decoder.c @@ -99,7 +99,7 @@ static FLAC__bool read_subframe_constant_(FLAC__StreamDecoder *decoder, unsigned static FLAC__bool read_subframe_fixed_(FLAC__StreamDecoder *decoder, unsigned channel, unsigned bps, const unsigned order, FLAC__bool do_full_decode); static FLAC__bool read_subframe_lpc_(FLAC__StreamDecoder *decoder, unsigned channel, unsigned bps, const unsigned order, FLAC...
2014 Sep 26
0
Patch to improve malformed vorbiscomment handling
...STATUS_SEEK_ERROR; } return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OK; diff --git a/src/libFLAC/stream_decoder.c b/src/libFLAC/stream_decoder.c index fac73f3..3c68fd8 100644 --- a/src/libFLAC/stream_decoder.c +++ b/src/libFLAC/stream_decoder.c @@ -87,7 +87,7 @@ static FLAC__bool find_metadata_(FLAC__StreamDecoder *decoder); static FLAC__bool read_metadata_(FLAC__StreamDecoder *decoder); static FLAC__bool read_metadata_streaminfo_(FLAC__StreamDecoder *decoder, FLAC__bool is_last, unsigned length); static FLAC__bool read_metadata_seektable_(FLAC__StreamDecoder *decoder, FLAC__bool is_last, unsigned lengt...
2004 Sep 10
2
Storing FLAC in Matroska
...you for your answers. I using the following code to try simply decode a flac file and write the decoded data raw PCM file. The resulting file is just noise and pops, so is the decoded data in a different format than PCM? struct flacData { FILE *inputFile; FILE *outputFile; char *filename; }; FLAC__StreamDecoderReadStatus flac_DecoderReadCallback(const FLAC__StreamDecoder *decoder, FLAC__byte buffer[], unsigned *bytes, void *client_data) { flacData *ourData = (flacData *)client_data; *bytes = fread((void *)buffer, 1, *bytes, ourData->inputFile); return FLAC__STREAM_DECODER_READ_STATUS_CONTINUE; }...
2014 Jun 19
5
[PATCH] stream_encoder : Improve selection of residual accumulator width
On Thu, Jun 19, 2014 at 03:30:22PM +0400, lvqcl wrote: > BTW, what can you say about the following place in stream_decoder.c > in read_subframe_lpc_() function: > > /*@@@@@@ technically not pessimistic enough, should be more like > if( (FLAC__uint64)order * ((((FLAC__uint64)1)<<bps)-1) * ((1<<subframe->qlp_coeff_precision)-1) < (((FLAC__uint64)-1)
2005 Feb 02
0
two small-ish optimizations (death by a thousand cuts)
...gt;consumed_bits = bits_; /* we hold off updating bb->total_consumed_bits until the end */ } --- orig/src/libFLAC/stream_decoder.c +++ mod/src/libFLAC/stream_decoder.c @@ -74,6 +74,7 @@ ***********************************************************************/ static void set_defaults_(FLAC__StreamDecoder *decoder); +static inline void read_channel_coding(FLAC__StreamDecoder *decoder); static FLAC__bool allocate_output_(FLAC__StreamDecoder *decoder, unsigned size, unsigned channels); static FLAC__bool has_id_filtered_(FLAC__StreamDecoder *decoder, FLAC__byte *id); static FLAC__bool find_metadat...
2004 Sep 10
2
Storing FLAC in Matroska
Hello, I'm looking into storing FLAC audio in Matroska and I have a few questions. 1. Can I use libflac to extract the compressed frames? Or will I need to write up a simple file parser? 2. What is required to decode the frames? From the docs I understand that you need the FRAME and you may need the METADATA_BLOCK. Thanks, Jory Stone jcsston@toughguy.net Matroska, the new,
2014 Dec 15
1
[PATCH] src/libFLAC/stream_decoder.c : Rework fix for seeking bug.
...++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/src/libFLAC/stream_decoder.c b/src/libFLAC/stream_decoder.c index d13b23b..211b4db 100644 --- a/src/libFLAC/stream_decoder.c +++ b/src/libFLAC/stream_decoder.c @@ -1281,9 +1281,6 @@ FLAC__bool allocate_output_(FLAC__StreamDecoder *decoder, unsigned size, unsigne unsigned i; FLAC__int32 *tmp; - /* Make sure size is some sensible minimum value. Plumb through predictor_order maybe? */ - size = size < FLAC__MAX_LPC_ORDER ? FLAC__MAX_LPC_ORDER : size ; - if(size <= decoder->private_->output_capacity &&a...
2004 Sep 10
2
Error initializing flac stream decoder.
I've cross-compiled flac for the armv4l processor (rio receiver), and i'm trying to start up a decode thread : #include <FLAC/stream_decoder.h> .... FLAC__StreamDecoder *flac = NULL; flac = FLAC__stream_decoder_new(); if (flac == NULL) { printf("[DECODE] Unable to initalize flac object\n"); pthread_exit(NULL); } And, oddly enough, it's consistantly failling at the FLAC__stream_decoder_n...
2004 Sep 10
0
new checkins
...02 15:07:22 -0000 @@ -22,6 +22,11 @@ #include "format.h" +#ifdef __cplusplus +extern "C" { +#endif + + typedef enum { FLAC__STREAM_DECODER_SEARCH_FOR_METADATA = 0, FLAC__STREAM_DECODER_READ_METADATA, @@ -160,5 +165,9 @@ FLAC__bool FLAC__stream_decoder_process_metadata(FLAC__StreamDecoder *decoder); FLAC__bool FLAC__stream_decoder_process_one_frame(FLAC__StreamDecoder *decoder); FLAC__bool FLAC__stream_decoder_process_remaining_frames(FLAC__StreamDecoder *decoder); + +#ifdef __cplusplus +} +#endif #endif Index: stream_encoder.h ================================================...
2011 May 24
3
Can a libFLAC encoder be initialize and called from inside a libFLAC decoder callback?
...();". Samples are submitted to the encoder on line with "FLAC__bool OK = FLAC__stream_encoder_process(m_Encoder, Buffer, Blocksize);". I have a version that decodes to a WAV file and then re-encodes the WAV file, but would like to avoid all that I/O. Regards. David FLAC__StreamDecoderWriteStatus FLACRecoder::StaticWriteCallback(const FLAC__StreamDecoder *FLACStreamDecoder, const FLAC__Frame *Frame, const FLAC__int32 *const Buffer[], void *ClientData) { return ((FLACRecoder *)(ClientData))->ClassWriteCallback(FLACStreamDecoder, Frame, Buffer); } FLAC__StreamDecoderW...
2004 Sep 10
3
new checkins
FYI, I have checked in a few interesting things. One is a speedup to the decoder (about 15% improvement in overall decode time). Another is a new interface to FLAC file metadata. If you're curious look at include/FLAC/metadata.h. It is basically a collection of object manipulation routines and iterators that make it pretty easy to add/edit/delete FLAC metadata in files efficiently. The
2013 Jul 01
2
About Decode Streaming
Sorry, I am newbie. Sample codes are from https://github.com/oneman/libflac/tree/master/examples/cpp. I used FLAC__stream_decoder_process_single function but it still gives exception. Maybe I could not control read callback, you're right. I will check it and write result in this thread. Thanks for help. 2013/7/1 Martijn van Beurden <mvanb1 at gmail.com> > I'll top-post this
2005 May 25
0
[PATCH] Fix fuction prototypes/definitions with void argument
...; -static int FLAC_XMMS__get_time(); -static void FLAC_XMMS__cleanup(); +static int FLAC_XMMS__get_time(void); +static void FLAC_XMMS__cleanup(void); static void FLAC_XMMS__get_song_info(char *filename, char **title, int *length); static void *play_loop_(void *arg); @@ -128,7 +128,7 @@ static FLAC__StreamDecoderWriteStatus wr static void metadata_callback_(const void *decoder, const FLAC__StreamMetadata *metadata, void *client_data); static void error_callback_(const void *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data); -static void init_decoder_func_tables(); +static void init_de...
2013 Jul 02
0
About Decode Streaming
...ode, so you may answer easily. This is decoder init stream function. *FLAC__stream_decoder_init_stream(m_decoder, decoderReadCallback, NULL, NULL, NULL, NULL, decoderWriteCallback, NULL, decoderErrorCallback, input_pile_array);* * * Then, callbacks * * /// \brief read callback function of decoder FLAC__StreamDecoderReadStatus decoderReadCallback(const FLAC__StreamDecoder *decoder, FLAC__byte buffer[], size_t *bytes, void *callback_param ); /// \brief write callback function of decoder FLAC__StreamDecoderWriteStatus decoderWriteCallback(const FLAC__StreamDecoder *decoder, const FLAC__Frame *frame, con...
2014 Nov 25
9
Two new CVEs against FLAC
Hi all, Google Security Team member, Michele Spagnuolo, recently found two potential problems in the FLAC code base. They are : CVE-2014-9028 : Heap buffer write overflow CVE-2014-8962 : Heap buffer read overflow For Linux distributions, the specific fixes for these two CVEs are available from Git here:
2014 Nov 25
1
Two new CVEs against FLAC
...1, predictor order of 16 and > blocksize of 4, the function would return true and blocksize-order in > the caller would still underflow. > > --- a/src/libFLAC/stream_decoder.c > +++ b/src/libFLAC/stream_decoder.c > @@ -2744,7 +2744,7 @@ FLAC__bool read_residual_partitioned_rice_(FLAC__StreamDecoder *decoder, unsigne > if(partition_samples < predictor_order) { > send_error_to_client_(decoder, FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC); > decoder->protected_->state = FLAC__STREAM_DECODER_SEARCH_FOR_FRAME_SYNC;...
2014 Dec 11
0
Two new CVEs against FLAC
...atch that, but I'd rather see the real seeking bug fixed instead and not hide it like this. Returning success with invalid/uninitialized data seems like a bad idea to me. --- a/src/libFLAC/stream_decoder.c +++ b/src/libFLAC/stream_decoder.c @@ -2609,6 +2609,9 @@ FLAC__bool read_subframe_fixed_(FLAC__StreamDecoder *decoder, unsigned channel, FLAC__ASSERT(0); } + if (decoder->private_->frame.header.blocksize < order) + return true; + /* decode the subframe */ if(do_full_decode) { memcpy(decoder->private_->ou...
2017 Nov 22
0
libFLAC JNA Issue
...lled, I update client_data sent in parameter, well received updated by native code stored in decoder variable. The only thing is missing to me, is a function to return client_data from decoder. This simple patch do the job for me : StreamDecoder.h : FLAC_API void *get_client_data_from_decoder(FLAC__StreamDecoder *decoder); StreamDecoder.c : void *get_client_data_from_decoder(FLAC__StreamDecoder *decoder) { return decoder->private_->client_data; } I finally can use this function after FLAC__stream_decoder_process_until_end_of_stream call to check client_data and assert no error happened....
2008 Jun 14
1
[Flac] Ogg Codecs 0.80.15035
...d FLAC__bitreader_free(FLAC__BitReader *br) { FLAC__ASSERT(0 != br); if(0 != br->buffer) free(br->buffer); The call stack is: > libFLAC.dll!FLAC__bitreader_free(FLAC__BitReader * br=0x035280c0) Line 348 + 0xe bytes C libFLAC.dll!FLAC__stream_decoder_finish(FLAC__StreamDecoder * decoder=0x035265f0) Line 685 + 0xf bytes C libFLAC++.dll!FLAC::Decoder::Stream::~Stream() Line 56 + 0xf bytes C++ dsfNativeFLACSource.dll!NativeFLACSourceFilter::~NativeFLACSourceFilter() Line 83 + 0x4d bytes C++ I've updated the FLAC source code from 1.1.0 to 1....