comparison libfaad.c @ 8590:7a463923ecd1 libavcodec

Change semantic of CONFIG_*, HAVE_* and ARCH_*. They are now always defined to either 0 or 1.
author aurel
date Tue, 13 Jan 2009 23:44:16 +0000
parents dc1a7a6ec58d
children 04423b2f6e0b
comparison
equal deleted inserted replaced
8589:a29b5b5c3c9d 8590:7a463923ecd1
33 #ifndef FAADAPI 33 #ifndef FAADAPI
34 #define FAADAPI 34 #define FAADAPI
35 #endif 35 #endif
36 36
37 /* 37 /*
38 * when CONFIG_LIBFAADBIN is defined the libfaad will be opened at runtime 38 * when CONFIG_LIBFAADBIN is true libfaad will be opened at runtime
39 */ 39 */
40 //#undef CONFIG_LIBFAADBIN 40 //#undef CONFIG_LIBFAADBIN
41 //#define CONFIG_LIBFAADBIN 41 //#define CONFIG_LIBFAADBIN 0
42 42 //#define CONFIG_LIBFAADBIN 1
43 #ifdef CONFIG_LIBFAADBIN 43
44 #if CONFIG_LIBFAADBIN
44 #include <dlfcn.h> 45 #include <dlfcn.h>
45 static const char* const libfaadname = "libfaad.so"; 46 static const char* const libfaadname = "libfaad.so";
46 #else 47 #else
47 #define dlopen(a) 48 #define dlopen(a)
48 #define dlclose(a) 49 #define dlclose(a)
222 static av_cold int faac_decode_init(AVCodecContext *avctx) 223 static av_cold int faac_decode_init(AVCodecContext *avctx)
223 { 224 {
224 FAACContext *s = avctx->priv_data; 225 FAACContext *s = avctx->priv_data;
225 faacDecConfigurationPtr faac_cfg; 226 faacDecConfigurationPtr faac_cfg;
226 227
227 #ifdef CONFIG_LIBFAADBIN 228 #if CONFIG_LIBFAADBIN
228 const char* err = 0; 229 const char* err = 0;
229 230
230 s->handle = dlopen(libfaadname, RTLD_LAZY); 231 s->handle = dlopen(libfaadname, RTLD_LAZY);
231 if (!s->handle) 232 if (!s->handle)
232 { 233 {
257 dfaac(GetErrorMessage); 258 dfaac(GetErrorMessage);
258 #endif 259 #endif
259 260
260 #undef dfaac 261 #undef dfaac
261 262
262 #ifdef CONFIG_LIBFAADBIN 263 #if CONFIG_LIBFAADBIN
263 if (err) { 264 if (err) {
264 dlclose(s->handle); 265 dlclose(s->handle);
265 av_log(avctx, AV_LOG_ERROR, "FAAD library: cannot resolve %s in %s!\n", 266 av_log(avctx, AV_LOG_ERROR, "FAAD library: cannot resolve %s in %s!\n",
266 err, libfaadname); 267 err, libfaadname);
267 return -1; 268 return -1;