[flac-dev] [PATCH] fix for metadata_iterators.c

Erik de Castro Lopo mle+la at mega-nerd.com
Sun May 22 05:15:57 UTC 2016

lvqcl wrote:

> My patch for metadata_iterators didn't completely fix the problem.
> The behavior of chain_prepare_for_write_() must always be the same
> as the behavior of FLAC__metadata_chain_check_if_tempfile_needed().
> Currently it's not the case: one check was missed in
> FLAC__metadata_chain_check_if_tempfile_needed(), and also chain_prepare_for_write_()
> checks sizes of metadata blocks *after* making the changes of the chain, while
> FLAC__metadata_chain_check_if_tempfile_needed() does it *before* the changes.
> This patch changes FLAC__metadata_chain_check_if_tempfile_needed() so that it
> keeps some info (lbs_state, lbs_size) about estimated changes and then
> uses it to check the block sizes.
> It also simplifies FLAC__metadata_chain_check_if_tempfile_needed() a little.

Applied. Thanks.

Erik de Castro Lopo

More information about the flac-dev mailing list