Displaying 20 results from an estimated 45 matches for "protected_".
Did you mean:
protected
2012 Apr 05
2
[PATCH 2/2] V2: Use a single definition of MIN and MAX in sources
...}
}
- if(!FLAC__format_entropy_coding_method_partitioned_rice_contents_ensure_size(partitioned_rice_contents, max(6, partition_order))) {
+ if(!FLAC__format_entropy_coding_method_partitioned_rice_contents_ensure_size(partitioned_rice_contents, flac_max(6u, partition_order))) {
decoder->protected_->state = FLAC__STREAM_DECODER_MEMORY_ALLOCATION_ERROR;
return false;
}
diff --git a/src/libFLAC/stream_encoder.c b/src/libFLAC/stream_encoder.c
index dd36b70..ce0c8da 100644
--- a/src/libFLAC/stream_encoder.c
+++ b/src/libFLAC/stream_encoder.c
@@ -60,6 +60,7 @@
#include "private/lpc.h...
2007 Apr 08
0
FLAC 24 bit test results
...rent blocksize&min/max_partition_order (and maybe predictor order) */
ok = ok && FLAC__memory_alloc_aligned_uint64_array(new_blocksize * 2, &encoder->private_->abs_residual_partition_sums_unaligned, &encoder->private_->abs_residual_partition_sums);
- if(encoder->protected_->do_escape_coding)
- ok = ok && FLAC__memory_alloc_aligned_unsigned_array(new_blocksize * 2, &encoder->private_->raw_bits_per_partition_unaligned, &encoder->private_->raw_bits_per_partition);
+ ok = ok && FLAC__memory_alloc_aligned_unsigned_array(new_blocksiz...
2011 Sep 26
1
mid-side coding and bits per sample
...st,
i'm doing a bit of analisys on flac's source code and i've run into something i can't quite grasp.
flac version 1.2.1
flaclib C
stream_encoder.c
function "process_subframes_"
line 2999
++++++++++++++++++++++
if(do_mid_side) {
FLAC__ASSERT(encoder->protected_->channels == 2);
for(channel = 0; channel < 2; channel++) {
const unsigned w = get_wasted_bits_(encoder->private_->integer_signal_mid_side[channel], encoder->protected_->blocksize);
encoder->private_->subframe_workspace_mid_side[channel][0].wa...
2004 Sep 10
2
better seeking
...even bother trying to figure out a target, we just use
- * our current position.
- */
- if(pos < 0) {
- FLAC__uint64 upos;
- if(decoder->private_->tell_callback(decoder, &upos, decoder->private_->client_data) != FLAC__SEEKABLE_STREAM_DECODER_TELL_STATUS_OK) {
- decoder->protected_->state = FLAC__SEEKABLE_STREAM_DECODER_SEEK_ERROR;
- return false;
- }
- pos = (FLAC__int32)upos;
- needs_seek = false;
- }
- else
- needs_seek = true;
-
- /* clip the position to the bounds, lower bound takes precedence */
- if(pos >= (FLAC__int64)upper_bound) {
- pos = (FLAC__int64)u...
2006 Nov 03
2
better seeking
...nt].sample_number;
- const FLAC__uint64 range_bytes = (upper_bound>lower_bound? upper_bound - lower_bound - 1 : 0);
+ while(1) {
+ /* check if the bounds are still ok */
+ if (lower_bound_sample + FLAC__MIN_BLOCK_SIZE > upper_bound_sample || lower_bound > upper_bound) {
+ decoder->protected_->state = FLAC__STREAM_DECODER_SEEK_ERROR;
+ return false;
+ }
+ if(needs_seek) {
#ifndef FLAC__INTEGER_ONLY_LIBRARY
#if defined _MSC_VER || defined __MINGW32__
- /* with MSVC you have to spoon feed it the casting */
- pos = (FLAC__int64)lower_bound + (FLAC__int64)(((FLAC__double)(FLAC_...
2012 May 05
5
[PATCH] Optionally, allow distros to use openssl for MD5 verification
...stream the first audio frame starts */
@@ -322,7 +322,9 @@ FLAC_API FLAC__StreamDecoder *FLAC__stream_decoder_new(void)
decoder->private_->file = 0;
set_defaults_(decoder);
-
+#if defined(HAVE_OPENSSL)
+ EVP_MD_CTX_init(&decoder->private_->md5context);
+#endif
decoder->protected_->state = FLAC__STREAM_DECODER_UNINITIALIZED;
return decoder;
@@ -346,7 +348,9 @@ FLAC_API void FLAC__stream_decoder_delete(FLAC__StreamDecoder *decoder)
for(i = 0; i < FLAC__MAX_CHANNELS; i++)
FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(&decoder->priva...
2006 Oct 28
3
better seeking
...don't even bother trying to figure out a target, we just use
- * our current position.
- */
- if(pos < 0) {
- FLAC__uint64 upos;
- if(decoder->private_->tell_callback(decoder, &upos, decoder->private_->client_data) != FLAC__STREAM_DECODER_TELL_STATUS_OK) {
- decoder->protected_->state = FLAC__STREAM_DECODER_SEEK_ERROR;
- return false;
- }
- pos = (FLAC__int64)upos;
- needs_seek = false;
- }
- else
- needs_seek = true;
-
- /* clip the position to the bounds, lower bound takes precedence */
- if(pos >= (FLAC__int64)upper_bound) {
- pos = (FLAC__int64)upper_boun...
2005 Jan 25
0
bitbuffer optimizations
...even bother trying to figure out a target, we just use
- * our current position.
- */
- if(pos < 0) {
- FLAC__uint64 upos;
- if(decoder->private_->tell_callback(decoder, &upos, decoder->private_->client_data) != FLAC__SEEKABLE_STREAM_DECODER_TELL_STATUS_OK) {
- decoder->protected_->state = FLAC__SEEKABLE_STREAM_DECODER_SEEK_ERROR;
- return false;
- }
- pos = (FLAC__int64)upos;
- needs_seek = false;
- }
- else
- needs_seek = true;
-
- /* clip the position to the bounds, lower bound takes precedence */
- if(pos >= (FLAC__int64)upper_bound) {
- pos = (FLAC__int64)u...
2007 Apr 05
2
FLAC 24 bit test results
On Thu, 2007-04-05 at 02:27 -0700, Brian Willoughby wrote:
> Josh (Green),
>
> Seems like the longest example in your list is a 15-second file. I
> would like to see the same problem exhibited in a file that is of a
> normal length. I have been recording full performances lasting
> hours, and flac always compresses the files below 70% of the original
> size.
>
2014 Dec 15
1
[PATCH] src/libFLAC/stream_decoder.c : Rework fix for seeking bug.
...FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE_ORDER_LEN))
return false; /* read_callback_ sets the state for us */
+ if(decoder->private_->frame.header.blocksize >> u32 < order) {
+ send_error_to_client_(decoder, FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC);
+ decoder->protected_->state = FLAC__STREAM_DECODER_SEARCH_FOR_FRAME_SYNC;
+ return true;
+ }
subframe->entropy_coding_method.data.partitioned_rice.order = u32;
subframe->entropy_coding_method.data.partitioned_rice.contents = &decoder->private_->partitioned_rice_contents[channel];
bre...
2014 Apr 07
2
Patch to fix compiler warnings and error status collisions
...__StreamDecodeInitStatus is still there. It is simply another name for FLAC__StreamDecoderState. The API does not change here, other than the numerical value of the enums. However, the bug that exists is that the numerical value of the enums collide and are being used interchangeably in decoder->protected_->state, so they really should be the same enum, IMHO.
-Lenny
>
> Cheers,
> Erik
> --
> ----------------------------------------------------------------------
> Erik de Castro Lopo
> http://www.mega-nerd.com/
> _______________________________________________
> flac...
2018 Mar 22
2
Crash when writing 32bit flac files, am I doing something wrong ?
Hello,
I manage to successfully write 8, 16 and 24 bit, all stereo, FLAC files.
But when I try to write 32 bit FLACs my program crashes.
*FLAC__stream_encoder_set_bits_per_sample *is called to match the desired
bit depth (8, 16, 24, 32)
It's the same code for all bit depths, i provide a fixed-size signed int
buffer to the lib (size=16384), with values with appropriate ranges for
each bit
2004 Sep 10
4
bitbuffer optimizations
Ok, here is a patch waiting for new CVS :). It works fine for me, but
please check it before commiting...
--
Miroslav Lichvar
-------------- next part --------------
--- src/libFLAC/bitbuffer.c.orig 2003-01-30 17:36:01.000000000 +0100
+++ src/libFLAC/bitbuffer.c 2003-01-30 21:53:18.000000000 +0100
@@ -51,6 +51,25 @@
*/
static const unsigned FLAC__BITBUFFER_DEFAULT_CAPACITY = ((65536 - 64) *
2008 Nov 06
2
libFLAC header checking
In stream_decoder.c function find_metadata_() checks whether a file is
valid or not. There are 4 cases it recognizes:
1) file begins with 'fLaC'
2) file begins with ID3 (skipped), followed by 'fLaC'
3) file may begin with 11111111 111110?? sync code (or 11111111111110,
depends on endianess i suppose). That is - a raw file with FLAC frames,
without header (right?).
4) file begins
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 Jul 28
1
Duplicate QLP coefficient restricting code
...l,
I was investigating the behaviour of the -p switch of flac. This
switch should enable exhaustive search for the optimal qlp
coefficient precision, but the resulting files are usually 0.5%
larger then when not using the switch. I stumbled upon this code
in stream_encoder
> if(encoder->protected_->do_qlp_coeff_prec_search) {
> min_qlp_coeff_precision = FLAC__MIN_QLP_COEFF_PRECISION;
> /* try to ensure a 32-bit datapath throughout for
> 16bps(+1bps for side channel) or less */
> if(subframe_bps <= 17) {
> max_qlp_coeff_precision = flac_min(32 - subfr...
2014 Nov 25
1
Two new CVEs against FLAC
...,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;
> - return true;
> + return false;
> }
> }
>
> Thoughts?
That may well be true. Is it possible to generate file that actually
triggers this?
Cheers,
Erik...
2018 Mar 24
0
Crash when writing 32bit flac files, am I doing something wrong ?
...* the reference encoder/decoder is currently limited to 24 bits because
* of prevalent 32-bit math, so make sure and use this value when
* appropriate.
*/
#define FLAC__REFERENCE_CODEC_MAX_BITS_PER_SAMPLE (24u)
also, init_stream_internal_() function already checks bit depth:
if(encoder->protected_->bits_per_sample <
FLAC__MIN_BITS_PER_SAMPLE || encoder->protected_->bits_per_sample >
FLAC__REFERENCE_CODEC_MAX_BITS_PER_SAMPLE)
return FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_BITS_PER_SAMPLE;
so, maybe you forgot to check return value for errors?
2007 Mar 06
1
FLAC__stream_decoder_seek_absolute with FLAC__STREAM_DECODER_SEEK_ERROR in 1.1.3 but it worked before
...where all the
entries have a stream offset of 0.
The result is that in the function seek_to_absolute_sample_, on line
3076 (file stream_decoder.c), the following test returns:
/* make sure we are not seeking in corrupted stream */
if (this_frame_sample < lower_bound_sample) {
decoder->protected_->state = FLAC__STREAM_DECODER_SEEK_ERROR;
return false;
}
because 'this_frame_sample' is equal to 0 (because the seek table caused
the seek search to start at the beginning of the stream)
Now, since seeking in that file worked perfectly fine with older
libraries, I think it woul...
2008 Dec 10
0
libFLAC header checking
...bit that should always be 0)
In MP3 it must not be 00 (00 is reserved).
Suggested code change is
from:
else if(x >> 2 == 0x3e) { /* MAGIC NUMBER for the last 6
sync bits */
decoder->private_->header_warmup[1] = (FLAC__byte)x;
decoder->protected_->state =
FLAC__STREAM_DECODER_READ_FRAME;
return true;
}
to
else if(x >> 1 == 0x7c) { /* MAGIC NUMBER for the last 6
sync bits and reserved 7th bit*/
decoder->private_->header_warmup[1] = (FLAC__byte)x;
de...