decoder/flac: fix assertion failure in tag_free() call
Initialize flac_data.tag right after flac_data_init(). This way, the "goto fail" won't jump to the point where tag_free(NULL) can be called.
This commit is contained in:
parent
64ca94c910
commit
c0c5119788
2
NEWS
2
NEWS
@ -1,4 +1,6 @@
|
|||||||
ver 0.15.1 (2009/??/??)
|
ver 0.15.1 (2009/??/??)
|
||||||
|
* dcecoders:
|
||||||
|
- flac: fix assertion failure in tag_free() call
|
||||||
* output:
|
* output:
|
||||||
- httpd: include sys/types.h (fixes Mac OS X)
|
- httpd: include sys/types.h (fixes Mac OS X)
|
||||||
* commands:
|
* commands:
|
||||||
|
@ -394,6 +394,7 @@ flac_decode_internal(struct decoder * decoder,
|
|||||||
if (!(flac_dec = flac_new()))
|
if (!(flac_dec = flac_new()))
|
||||||
return;
|
return;
|
||||||
flac_data_init(&data, decoder, input_stream);
|
flac_data_init(&data, decoder, input_stream);
|
||||||
|
data.tag = tag_new();
|
||||||
|
|
||||||
#if defined(FLAC_API_VERSION_CURRENT) && FLAC_API_VERSION_CURRENT > 7
|
#if defined(FLAC_API_VERSION_CURRENT) && FLAC_API_VERSION_CURRENT > 7
|
||||||
if(!FLAC__stream_decoder_set_metadata_respond(flac_dec, FLAC__METADATA_TYPE_VORBIS_COMMENT))
|
if(!FLAC__stream_decoder_set_metadata_respond(flac_dec, FLAC__METADATA_TYPE_VORBIS_COMMENT))
|
||||||
@ -422,8 +423,6 @@ flac_decode_internal(struct decoder * decoder,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
data.tag = tag_new();
|
|
||||||
|
|
||||||
if (!flac_process_metadata(flac_dec)) {
|
if (!flac_process_metadata(flac_dec)) {
|
||||||
err = "problem reading metadata";
|
err = "problem reading metadata";
|
||||||
goto fail;
|
goto fail;
|
||||||
|
Loading…
Reference in New Issue
Block a user