Commit 7efe8f3b authored by Erik de Castro Lopo's avatar Erik de Castro Lopo

metadata_iterators.c : Set status when metadata itereator is not writable.

The status should be FLAC__METADATA_SIMPLE_ITERATOR_STATUS_ILLEGAL_INPUT.

Closes: http://sourceforge.net/p/flac/patches/50/
parent cdff952f
......@@ -763,8 +763,10 @@ FLAC_API FLAC__bool FLAC__metadata_simple_iterator_insert_block_after(FLAC__Meta
FLAC__ASSERT(0 != iterator->file);
FLAC__ASSERT(0 != block);
if(!iterator->is_writable)
if(!iterator->is_writable) {
iterator->status = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_NOT_WRITABLE;
return false;
}
if(block->type == FLAC__METADATA_TYPE_STREAMINFO) {
iterator->status = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_ILLEGAL_INPUT;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment