Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
7b0dee28
Commit
7b0dee28
authored
17 years ago
by
Måns Rullgård
Browse files
Options
Downloads
Patches
Plain Diff
clean up dynamic loading of libfaad
Originally committed as revision 11609 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
e2fdba65
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libavcodec/libfaad.c
+20
-35
20 additions, 35 deletions
libavcodec/libfaad.c
with
20 additions
and
35 deletions
libavcodec/libfaad.c
+
20
−
35
View file @
7b0dee28
...
...
@@ -234,47 +234,32 @@ static int faac_decode_init(AVCodecContext *avctx)
libfaadname
,
dlerror
());
return
-
1
;
}
#define dfaac(a, b) \
do { static const char* n = AV_STRINGIFY(faacDec ## a); \
if ((s->faacDec ## a = b dlsym( s->handle, n )) == NULL) { err = n; break; } } while(0)
for
(;;)
{
#define dfaac(a) do { \
const char* n = AV_STRINGIFY(faacDec ## a); \
if (!err && !(s->faacDec ## a = dlsym(s->handle, n))) { \
err = n; \
} \
} while(0)
#else
/* !CONFIG_LIBFAADBIN */
#define dfaac(a
, b
) s->faacDec ## a = faacDec ## a
#define dfaac(a) s->faacDec ## a = faacDec ## a
#endif
/* CONFIG_LIBFAADBIN */
// resolve all needed function calls
dfaac
(
Open
,
(
faacDecHandle
FAADAPI
(
*
)(
void
)));
dfaac
(
Close
,
(
void
FAADAPI
(
*
)(
faacDecHandle
hDecoder
)));
dfaac
(
GetCurrentConfiguration
,
(
faacDecConfigurationPtr
FAADAPI
(
*
)(
faacDecHandle
)));
#ifndef FAAD2_VERSION
dfaac
(
SetConfiguration
,
(
int
FAADAPI
(
*
)(
faacDecHandle
,
faacDecConfigurationPtr
)));
dfaac
(
Init
,
(
int
FAADAPI
(
*
)(
faacDecHandle
,
unsigned
char
*
,
unsigned
long
*
,
unsigned
long
*
)));
dfaac
(
Init2
,
(
int
FAADAPI
(
*
)(
faacDecHandle
,
unsigned
char
*
,
unsigned
long
,
unsigned
long
*
,
unsigned
long
*
)));
dfaac
(
Decode
,
(
int
FAADAPI
(
*
)(
faacDecHandle
,
unsigned
char
*
,
unsigned
long
*
,
short
*
,
unsigned
long
*
)));
#else
dfaac
(
SetConfiguration
,
(
unsigned
char
FAADAPI
(
*
)(
faacDecHandle
,
faacDecConfigurationPtr
)));
dfaac
(
Init
,
(
long
FAADAPI
(
*
)(
faacDecHandle
,
unsigned
char
*
,
unsigned
long
,
unsigned
long
*
,
unsigned
char
*
)));
dfaac
(
Init2
,
(
char
FAADAPI
(
*
)(
faacDecHandle
,
unsigned
char
*
,
unsigned
long
,
unsigned
long
*
,
unsigned
char
*
)));
dfaac
(
Decode
,
(
void
*
FAADAPI
(
*
)(
faacDecHandle
,
faacDecFrameInfo
*
,
unsigned
char
*
,
unsigned
long
)));
dfaac
(
GetErrorMessage
,
(
char
*
FAADAPI
(
*
)(
unsigned
char
)));
// resolve all needed function calls
dfaac
(
Open
);
dfaac
(
Close
);
dfaac
(
GetCurrentConfiguration
);
dfaac
(
SetConfiguration
);
dfaac
(
Init
);
dfaac
(
Init2
);
dfaac
(
Decode
);
#ifdef FAAD2_VERSION
dfaac
(
GetErrorMessage
);
#endif
#undef dfacc
#undef dfaac
#ifdef CONFIG_LIBFAADBIN
break
;
}
if
(
err
)
{
dlclose
(
s
->
handle
);
av_log
(
avctx
,
AV_LOG_ERROR
,
"FAAD library: cannot resolve %s in %s!
\n
"
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment