Displaying 2 results from an estimated 2 matches for "flac__metadata_iterator_get_block".
2004 Sep 10
1
metaflac bug
...block)) {
+ fprintf(stderr, "%s: ERROR: adding new VORBIS_COMMENT block to metadata, status =\"%s\"\n", filename, FLAC__Metadata_ChainStatusString[FLAC__metadata_chain_status(chain)]);
+ return false;
+ }
+ /* iterator is left pointing to new block */
+ FLAC__ASSERT(FLAC__metadata_iterator_get_block(iterator) == block);
+ } else {
+ FLAC__metadata_iterator_delete(iterator);
+ return ok;
}
- /* iterator is left pointing to new block */
- FLAC__ASSERT(FLAC__metadata_iterator_get_block(iterator) == block);
- }
FLAC__ASSERT(0 != block);
FLAC__ASSERT(block->type == FLAC__METADATA...
2013 Jul 09
0
Slight memory leak or bad documentation
...(the source says "return local::construct(::FLAC__metadata_simple_iterator_get_block(iterator_));"), if one does not delete this pointer, the program leaks memory (see attached example, run it through valgrind).
However the documentation for get_block() only refers to the C API function FLAC__metadata_iterator_get_block(), which expilicitly states: "Do not call FLAC__metadata_object_delete() on the returned object".
I don't see an easy way to change get_block() to return a pointer which wouldn't require deleting (as the underlying C function doesn't return a pointer to a C++ object), so I th...