[Flac-dev] [patch] Decoding non 8/16/24 bps audio to raw format should fail cleanly

Christopher Key cjk32 at cam.ac.uk
Wed Jul 14 04:39:47 PDT 2010


  On 14/07/2010 12:01, Christopher Key wrote:
>  When decoding a FLAC file with bits per sample that is not a multiple 
> of 8 and outputting in raw format, the decoder gets as far as the 
> write callback before realising that it doesn't know how to write the 
> data.  It then fails with an unhelpful message (or trips an assert() 
> in debug mode).  The attached patch performs the check earlier, and 
> gives a more helpful error message.
>
Apologies for the immediate correction.  The newly attached patch is 
probably somewhat safer, depending on whether libFLAC catches bps==0 || 
bps>=32 itself.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: flac-raw-output-bps-check.patch
Url: http://lists.xiph.org/pipermail/flac-dev/attachments/20100714/58ce621f/attachment.txt 


More information about the Flac-dev mailing list