Correctly initialize FLAC_API_SUPPORTS_OGG_FLAC
authorUlrich Klauer <ulrich@chirlu.de>
Sat, 25 May 2013 12:14:08 +0000 (14:14 +0200)
committerErik de Castro Lopo <erikd@mega-nerd.com>
Sat, 25 May 2013 21:42:13 +0000 (07:42 +1000)
Commits a7e3705d051bafd1cae90f6605287cc1d9f2a18d and
a4c321e492748db0a7e38240699ba420ba88e01c, while trying to simplify how
the FLAC_API_SUPPORTS_OGG_FLAC global variable was initialized,
inadvertently caused it to be always set to false, whether Ogg support
was compiled in or not.

This commit reverts the relevant part to how it looked in the 1.2.1
release, which is verbose but correct.

The problem was found by Robert Kausch <robert.kausch@freac.org>.

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
src/libFLAC/stream_decoder.c

index 33be1e8..f4d2d39 100644 (file)
 
 
 /* technically this should be in an "export.c" but this is convenient enough */
-#ifdef FLAC_API_SUPPORTS_OGG_FLAC
-FLAC_API int FLAC_API_SUPPORTS_OGG_FLAC = FLAC__HAS_OGG ;
+FLAC_API int FLAC_API_SUPPORTS_OGG_FLAC =
+#if FLAC__HAS_OGG
+       1
 #else
-FLAC_API int FLAC_API_SUPPORTS_OGG_FLAC = 0 ;
+       0
 #endif
+;
 
 
 /***********************************************************************