From c9f05ed2100e73b99a6d172ce78d763456071f72 Mon Sep 17 00:00:00 2001 From: Ulrich Klauer Date: Sat, 25 May 2013 14:14:08 +0200 Subject: [PATCH] Correctly initialize FLAC_API_SUPPORTS_OGG_FLAC 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 . Signed-off-by: Erik de Castro Lopo --- src/libFLAC/stream_decoder.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/libFLAC/stream_decoder.c b/src/libFLAC/stream_decoder.c index 33be1e82..f4d2d39f 100644 --- a/src/libFLAC/stream_decoder.c +++ b/src/libFLAC/stream_decoder.c @@ -55,11 +55,13 @@ /* 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 +; /***********************************************************************