[flac-dev] [PATCH] fix for metadata_iterators.c
lvqcl.mail at gmail.com
Sun May 15 12:22:11 UTC 2016
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 6644 bytes
Desc: not available
More information about the flac-dev