search for: seek_to_absolute_sample_

Displaying 9 results from an estimated 9 matches for "seek_to_absolute_sample_".

2015 Jun 16
0
Low-level seek routines in libFLAC
...odify libFLAC in a way that it doesn't call any user callbacks while performing seeking. Although I added a dirty hack for asynchronous read() to work, my first goal here is to discuss with you a low-level seek() interface. It's quite clear what we need to do here: just split the function seek_to_absolute_sample_() into 2 public functions (they are shown below). seek_to_absolute_sample_() can be easily modified to use those functions, and we won't change its behaviour. The user code that uses those functions might look like this: void foo() { FLAC__uint64 offset; FLAC__stream_decoder_seek_prepar...
2007 Mar 06
1
FLAC__stream_decoder_seek_absolute with FLAC__STREAM_DECODER_SEEK_ERROR in 1.1.3 but it worked before
...ow I have some streams where seek does not work anymore, but they used to work before. After a bit of debugging, it looks like those streams (created a long time ago with an old version of FLAC) have a seek table 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&...
2014 Dec 11
2
Two new CVEs against FLAC
On Thu, Dec 11, 2014 at 11:12:25AM +0100, Martijn van Beurden wrote: > Op 11-12-14 om 10:53 schreef Martijn van Beurden: > > Op 11-12-14 om 10:05 schreef Miroslav Lichvar: > >> but I'd rather see the real seeking bug fixed instead > > > > I think I might have a fix [...] So the problem is that FLAC__stream_decoder_process_single returns error before it finds a
2014 Dec 11
0
Two new CVEs against FLAC
...real seeking bug fixed instead > > > > > > I think I might have a fix [...] > > So the problem is that FLAC__stream_decoder_process_single returns > error before it finds a valid frame? > I'm not sure whether we mean the same thing, but I think the problem is that seek_to_absolute_sample_ calls FLAC__stream_decoder_process_single, which calls read_frame_, which calls read_subframe_, which calls either read_subframe_fixed_ or read_subframe_lpc_, which call read_residual_partitioned_rice_. The return false set there is propagated all the way down. So, because the decoding of the fram...
2004 Sep 10
2
better seeking
.... With attached patch it is much better. -- Miroslav Lichvar -------------- next part -------------- --- src/libFLAC/seekable_stream_decoder.c.orig 2003-02-26 19:41:51.000000000 +0100 +++ src/libFLAC/seekable_stream_decoder.c 2003-07-09 23:49:35.000000000 +0200 @@ -816,11 +816,11 @@ FLAC__bool seek_to_absolute_sample_(FLAC__SeekableStreamDecoder *decoder, FLAC__uint64 stream_length, FLAC__uint64 target_sample) { - FLAC__uint64 first_frame_offset, lower_bound, upper_bound; - FLAC__int64 pos = -1, last_pos = -1; - int i, lower_seek_point = -1, upper_seek_point = -1; + FLAC__uint64 first_frame_offset, lower_bound,...
2006 Oct 28
3
better seeking
...======================================== RCS file: /cvsroot/flac/flac/src/libFLAC/stream_decoder.c,v retrieving revision 1.117 diff -u -r1.117 stream_decoder.c --- stream_decoder.c 16 Oct 2006 15:49:18 -0000 1.117 +++ stream_decoder.c 28 Oct 2006 17:12:19 -0000 @@ -2923,18 +2923,18 @@ FLAC__bool seek_to_absolute_sample_(FLAC__StreamDecoder *decoder, FLAC__uint64 stream_length, FLAC__uint64 target_sample) { - FLAC__uint64 first_frame_offset = decoder->private_->first_frame_offset, lower_bound, upper_bound; + FLAC__uint64 first_frame_offset = decoder->private_->first_frame_offset, lower_bound, upper_bou...
2005 Jan 25
0
bitbuffer optimizations
...ch for seekable stream decoder, originally posted on 09/07/2003. -- Miroslav Lichvar -------------- next part -------------- --- seekable_stream_decoder.c.orig 2005-01-25 05:18:31.000000000 +0100 +++ seekable_stream_decoder.c 2005-01-25 23:39:03.000000000 +0100 @@ -857,11 +857,11 @@ FLAC__bool seek_to_absolute_sample_(FLAC__SeekableStreamDecoder *decoder, FLAC__uint64 stream_length, FLAC__uint64 target_sample) { - FLAC__uint64 first_frame_offset, lower_bound, upper_bound; - FLAC__int64 pos = -1, last_pos = -1; - int i, lower_seek_point = -1, upper_seek_point = -1; + FLAC__uint64 first_frame_offset, lower_bound,...
2006 Nov 03
2
better seeking
...================= RCS file: /cvsroot/flac/flac/src/libFLAC/stream_decoder.c,v retrieving revision 1.117 diff -u -r1.117 stream_decoder.c --- src/libFLAC/stream_decoder.c 16 Oct 2006 15:49:18 -0000 1.117 +++ src/libFLAC/stream_decoder.c 3 Nov 2006 08:32:35 -0000 @@ -2923,23 +2923,23 @@ FLAC__bool seek_to_absolute_sample_(FLAC__StreamDecoder *decoder, FLAC__uint64 stream_length, FLAC__uint64 target_sample) { - FLAC__uint64 first_frame_offset = decoder->private_->first_frame_offset, lower_bound, upper_bound; - FLAC__int64 pos = -1, last_pos = -1; - int i, lower_seek_point = -1, upper_seek_point = -1; + FLAC__u...
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) *