Ulrich Klauer
2013-May-25 12:14 UTC
[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 <robert.kausch at freac.org>. --- 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 33be1e8..f4d2d39 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 +; /*********************************************************************** -- 1.7.10.4 --=_vA9B0g0mKp5QbmIrcmD4lw5 Content-Type: text/x-diff; charset=us-ascii; name=0001-Fix-mistyped-variable-name.patch Content-Disposition: attachment; filename=0001-Fix-mistyped-variable-name.patch; size=989