search for: flac__metadata_object_delet

Displaying 6 results from an estimated 6 matches for "flac__metadata_object_delet".

2008 May 09
1
FLAC__metadata_get_picture()
...amp; 315 obj->data.picture.colors <= max_colors && 316 (area > max_area_seen || (area == max_area_seen && obj->data.picture.depth > max_depth_seen)) 317 ) { 318 if(*picture) 319 FLAC__metadata_object_delete(*picture); 320 *picture = obj; // <------- HERE 321 max_area_seen = area; 322 max_depth_seen = obj->data.picture.depth; 323 } 324 else { 325 FLAC__metadata_object_delete(obj); 326...
2015 Jun 28
2
about libFLAC/metadata_object.c
There are two functions: static void vorbiscomment_entry_array_delete_(FLAC__StreamMetadata_VorbisComment_Entry *object_array, unsigned num_comments); and static void cuesheet_track_array_delete_(FLAC__StreamMetadata_CueSheet_Track *object_array, unsigned num_tracks); which first dereference object_array and only then check it for NULL: free(object_array[i].indices);
2006 Sep 06
1
FLAC__metadata_simple_iterator_set_block corrupting Flac (ogg) stream?
...ears to be embedded an Ogg stream. This particular file also has ID3 headers at the beginning, but I was planning on ignoring those and fixing them up using some ID3 code later on ... Now, to read the comments is quite simple: FLAC__metadata_get_tags(fileName, &tagData); ... .. . FLAC__metadata_object_delete(tagData); For writing to the file, however, I do something along the following lines (error code stripped out to keep things shorter), this is pretty much as the flac documentation suggests: result = FLAC__metadata_simple_iterator_init(iterator, fileName, FALSE, FALSE); /**...
2008 May 19
1
Memory leaks due to Metadata object vorbis comment API ???
...err, "encoding: %s\n", ok? "succeeded" : "FAILED"); > fprintf(stderr, " state: %s\n", > FLAC__StreamEncoderStateString[FLAC__stream_encoder_get_state(encoder)]); > > /* now that encoding is finished, the metadata can be freed */ > FLAC__metadata_object_delete(metadata[0]); > FLAC__metadata_object_delete(metadata[1]); > FLAC__stream_encoder_delete(encoder); > > fclose(fin); > > return 0; > } > > void progress_callback(const FLAC__StreamEncoder *encoder, FLAC__uint64 > bytes_written, FLAC__uint64 samples_writ...
2010 Mar 08
0
Difficulties in add cover art to FLAC file
...iterator)) ; const char *violation; if( !FLAC__metadata_object_picture_is_legal(picture, &violation)) printf( "Illegal Picture: %s", violation ); if(!FLAC__metadata_iterator_insert_block_after(iterator, picture)) { printf(L" ERROR: adding new PICTURE block to metadata"); FLAC__metadata_object_delete(picture); } FLAC__metadata_iterator_delete(iterator); FLAC__metadata_chain_sort_padding(chain); if(!FLAC__metadata_chain_write(chain, true, false )) { const FLAC__Metadata_ChainStatus status = FLAC__metadata_chain_status(chain); printf( "Fail to write: %d", status ); } FLAC__metadat...
2013 Jul 09
0
Slight memory leak or bad documentation
...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 think the documentation for the FLAC++ API should be changed to say that the...