Commit 4c5a3eb2 authored by conrad's avatar conrad
Browse files

fix tests to run when only FLAC is enabled, and fix immediate delete of FLAC

encoder


git-svn-id: http://svn.annodex.net/libfishsound/branches/1.0-stable@3371 8158c8cd-e7e1-0310-9fa4-c5954c97daef
parent 0ce90907
......@@ -633,11 +633,15 @@ fs_flac_delete (FishSound * fsound)
#endif
if (fsound->mode == FISH_SOUND_DECODE) {
FLAC__stream_decoder_finish(fi->fsd);
FLAC__stream_decoder_delete(fi->fsd);
if (fi->fsd) {
FLAC__stream_decoder_finish(fi->fsd);
FLAC__stream_decoder_delete(fi->fsd);
}
} else if (fsound->mode == FISH_SOUND_ENCODE) {
FLAC__stream_encoder_finish(fi->fse);
FLAC__stream_encoder_delete(fi->fse);
if (fi->fse) {
FLAC__stream_encoder_finish(fi->fse);
FLAC__stream_encoder_delete(fi->fse);
}
if (fi->buffer) fs_free(fi->buffer);
}
......
......@@ -64,8 +64,10 @@ main (int argc, char * argv[])
*/
#if HAVE_VORBIS
fsinfo.format = FISH_SOUND_VORBIS;
#else
#elif HAVE_SPEEX
fsinfo.format = FISH_SOUND_SPEEX;
#else
fsinfo.format = FISH_SOUND_FLAC;
#endif
#if FS_ENCODE
......
......@@ -83,5 +83,10 @@ main (int argc, char * argv[])
noop_test (FISH_SOUND_SPEEX);
#endif
#if HAVE_FLAC
INFO ("Testing new/delete for FLAC");
noop_test (FISH_SOUND_FLAC);
#endif
exit (0);
}
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