Hello,

 

thank you for the response, I’ll try compiling later with these lines removed. 
I’d be in favor of a proper compile-time option for this.

 

> I think providing an API function and flac+metaflac command line option is 
> going to be confusing and they will probably be misused. A compile time 
> option might be possible though, libogg provides that too.

I don’t see how the option would be misused or be confusing. As I’ve 
discovered, popular FLAC-compatible tools like ffmpeg (or libavcodec’s FLAC 
implementation respectively) don’t strictly adhere to the standard here in 
order to support weirder files, and the FLAC tools themselves already have 
options to adhere or deviate from the streamable subset, i.e. a particularly 
simple part of the FLAC format. If the option has a name that cannot be used by 
accident, and if it’s properly documented that it may lead to mis-syncing, 
glitchy audio etc., I don’t see the harm in a run-time option. Though I won’t 
die on this hill, so feel free to ignore me here.

 

Regards and thanks for your help,

 

kleines Filmröllchen

 

Von: Martijn van Beurden <mva...@gmail.com> 
Gesendet: Freitag, 30. Juni 2023 07:23
An: Manuel Bertsch <malu.bert...@gmail.com>
Cc: flac-dev@xiph.org
Betreff: Re: [flac-dev] Disable all checksum verification in flac/metaflac

 

Hi,

 

Is it possible for you to compile flac/metaflac yourself? Then you'll only need 
to remove a few lines, namely these 4: 
https://github.com/xiph/flac/blob/28e4f0528c76b296c561e922ba67d43751990599/src/libFLAC/stream_decoder.c#L2118-L2121
 and these 7: 
https://github.com/xiph/flac/blob/28e4f0528c76b296c561e922ba67d43751990599/src/libFLAC/stream_decoder.c#L2141-L2147
 As you can see these lines are also disabled on fuzzing.

 

I think providing an API function and flac+metaflac command line option is 
going to be confusing and they will probably be misused. A compile time option 
might be possible though, libogg provides that too.

 

Kind regards,

 

Martijn van Beurden

 

Op do 29 jun. 2023 22:28 schreef Manuel Bertsch <malu.bert...@gmail.com 
<mailto:malu.bert...@gmail.com> >:

Hello all,

 

I’m trying to use flac and metaflac as tooling to analyze the generated FLAC 
files of a new encoder implementation. However, while my own third-party 
decoder can handle the output just fine, flac, metaflac, and other tools 
discard the output since the frame checksum (footer CRC-16) is invalid. This is 
expected, since I have no checksum generation implemented apart from the frame 
header checksum (all other checksums are written as 0), but it prevents me from 
making development process without being able to check my outputs against the 
reference implementation. I looked around and I couldn’t find a way to turn off 
either tool’s checksum verification. So I’d like to know how one could turn off 
checksum verification in the tools, and if that’s not currently possible, I’d 
like to see that as a feature in a future version of flac. (In that case I 
would also try to disable the checks in code permanently, though my solution is 
most likely not going to be upstreamable in any capacity.)

 

FYI, the third-party decoder is highly compliant according to the spec test 
suite, producing identical audio playback on almost all of the files, but it 
also doesn’t verify or error on any checksums. ffplay and ffmpeg both accept 
the file and can play and transcode it correctly, although they ignore the 
sample count in the streaminfo header and will read all frames they can find. 
The latter leads me to believe that checksums are the actual issue, even though 
flac reports the generic “Bad Header” and “Lost Sync”.

 

Greetings and thanks in advance,

 

Kleines Filmröllchen

_______________________________________________
flac-dev mailing list
flac-dev@xiph.org <mailto:flac-dev@xiph.org> 
http://lists.xiph.org/mailman/listinfo/flac-dev

_______________________________________________
flac-dev mailing list
flac-dev@xiph.org
http://lists.xiph.org/mailman/listinfo/flac-dev

Reply via email to