comparison a52dec.c @ 2846:40765c51a7a9 libavcodec

Compilation fixes part 1 patch by (Arvind R. and Burkhard Plaum, plaum, ipf uni-stuttgart de)
author michael
date Fri, 26 Aug 2005 19:05:44 +0000
parents 141a9539e270
children bfabfdf9ce55
comparison
equal deleted inserted replaced
2845:d9f4b93e81c5 2846:40765c51a7a9
71 #ifdef CONFIG_A52BIN 71 #ifdef CONFIG_A52BIN
72 static void* dlsymm(void* handle, const char* symbol) 72 static void* dlsymm(void* handle, const char* symbol)
73 { 73 {
74 void* f = dlsym(handle, symbol); 74 void* f = dlsym(handle, symbol);
75 if (!f) 75 if (!f)
76 fprintf(stderr, "A52 Decoder - function '%s' can't be resolved\n", symbol); 76 av_log( NULL, AV_LOG_ERROR, "A52 Decoder - function '%s' can't be resolved\n", symbol);
77 return f; 77 return f;
78 }
79
80 int ff_a52_syncinfo( AVCodecContext * avctx, uint8_t * buf, int * flags, int * sample_rate, int * bit_rate )
81 {
82 AC3DecodeState *s = avctx->priv_data;
83
84 return s->a52_syncinfo(buf, flags, sample_rate, bit_rate);
78 } 85 }
79 #endif 86 #endif
80 87
81 static int a52_decode_init(AVCodecContext *avctx) 88 static int a52_decode_init(AVCodecContext *avctx)
82 { 89 {
84 91
85 #ifdef CONFIG_A52BIN 92 #ifdef CONFIG_A52BIN
86 s->handle = dlopen(liba52name, RTLD_LAZY); 93 s->handle = dlopen(liba52name, RTLD_LAZY);
87 if (!s->handle) 94 if (!s->handle)
88 { 95 {
89 fprintf(stderr, "A52 library %s could not be opened! \n%s\n", liba52name, dlerror()); 96 av_log( avctx, AV_LOG_ERROR, "A52 library %s could not be opened! \n%s\n", liba52name, dlerror());
90 return -1; 97 return -1;
91 } 98 }
92 s->a52_init = (a52_state_t* (*)(uint32_t)) dlsymm(s->handle, "a52_init"); 99 s->a52_init = (a52_state_t* (*)(uint32_t)) dlsymm(s->handle, "a52_init");
93 s->a52_samples = (sample_t* (*)(a52_state_t*)) dlsymm(s->handle, "a52_samples"); 100 s->a52_samples = (sample_t* (*)(a52_state_t*)) dlsymm(s->handle, "a52_samples");
94 s->a52_syncinfo = (int (*)(uint8_t*, int*, int*, int*)) dlsymm(s->handle, "a52_syncinfo"); 101 s->a52_syncinfo = (int (*)(uint8_t*, int*, int*, int*)) dlsymm(s->handle, "a52_syncinfo");