[FFmpeg-devel] [PATCH] FLAC parser

Justin Ruggles justin.ruggles
Sun Mar 29 05:45:52 CEST 2009


Justin Ruggles wrote:
> Michael Niedermayer wrote:
>> On Sat, Mar 28, 2009 at 10:24:04PM -0400, Justin Ruggles wrote:
>>> Michael Niedermayer wrote:
>>>> also you should favor chains which dont change samplerate or other such
>>>> things.
>>> Do you mean to pick a sequence that doesn't change values over an
>>> earlier sequence of the same size that does change values?  Or something
>>> with more weight than that?
>> I think this is not that important ATM, but i would tend to give
>> things like samplerate changes more weight.
>> i mean, for example:
>> h0----->h1------->h2
>>   --------------->
>>
>> and assuming all crcs match
>> but h1 has a different sample rate than h0 and h2 
>> here the shorter chain seems more likely correct, but this depends on
>> my assumtation that a single lonely packet with different samplerate is
>> very unlikely.
> 
> The same holds true for bps and channels.  The FLAC format description
> does not explicitly disallow changing these values mid-stream, but the
> libFLAC reference decoder considers changing some of them from one frame
> to the next to be an error.

Update: libFLAC considers changing ANY of these to be an error.

ERROR, bits-per-sample is 8 in this frame but 16 in previous frames

ERROR, sample rate is 48000 in this frame but 44100 in previous frames

ERROR, channels is 1 in this frame but 2 in previous frames


-Justin




More information about the ffmpeg-devel mailing list