[xiph-commits] r3371 - in libfishsound/branches/1.0-stable/src:
libfishsound tests
conrad at svn.annodex.net
conrad at svn.annodex.net
Sun Jan 20 19:42:56 PST 2008
Author: conrad
Date: 2008-01-20 19:42:55 -0800 (Sun, 20 Jan 2008)
New Revision: 3371
Modified:
libfishsound/branches/1.0-stable/src/libfishsound/flac.c
libfishsound/branches/1.0-stable/src/tests/comment-test.c
libfishsound/branches/1.0-stable/src/tests/noop.c
Log:
fix tests to run when only FLAC is enabled, and fix immediate delete of FLAC
encoder
Modified: libfishsound/branches/1.0-stable/src/libfishsound/flac.c
===================================================================
--- libfishsound/branches/1.0-stable/src/libfishsound/flac.c 2008-01-21 03:32:44 UTC (rev 3370)
+++ libfishsound/branches/1.0-stable/src/libfishsound/flac.c 2008-01-21 03:42:55 UTC (rev 3371)
@@ -633,11 +633,15 @@
#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);
}
Modified: libfishsound/branches/1.0-stable/src/tests/comment-test.c
===================================================================
--- libfishsound/branches/1.0-stable/src/tests/comment-test.c 2008-01-21 03:32:44 UTC (rev 3370)
+++ libfishsound/branches/1.0-stable/src/tests/comment-test.c 2008-01-21 03:42:55 UTC (rev 3371)
@@ -64,8 +64,10 @@
*/
#if HAVE_VORBIS
fsinfo.format = FISH_SOUND_VORBIS;
+#elif HAVE_SPEEX
+ fsinfo.format = FISH_SOUND_SPEEX;
#else
- fsinfo.format = FISH_SOUND_SPEEX;
+ fsinfo.format = FISH_SOUND_FLAC;
#endif
#if FS_ENCODE
Modified: libfishsound/branches/1.0-stable/src/tests/noop.c
===================================================================
--- libfishsound/branches/1.0-stable/src/tests/noop.c 2008-01-21 03:32:44 UTC (rev 3370)
+++ libfishsound/branches/1.0-stable/src/tests/noop.c 2008-01-21 03:42:55 UTC (rev 3371)
@@ -83,5 +83,10 @@
noop_test (FISH_SOUND_SPEEX);
#endif
+#if HAVE_FLAC
+ INFO ("Testing new/delete for FLAC");
+ noop_test (FISH_SOUND_FLAC);
+#endif
+
exit (0);
}
More information about the commits
mailing list