[FFmpeg-devel] [PATCH] Symbian OS won't load binaries which have a function pointer assigned directly using a library routine
compn
tempn
Mon Jan 24 17:51:53 CET 2011
On Mon, 24 Jan 2011 16:18:51 +0100, Michael Niedermayer wrote:
>On Mon, Jan 24, 2011 at 01:16:04PM +0000, M?ns Rullg?rd wrote:
>> Pankaj yadav <pankajdnapster at gmail.com> writes:
>>
>> > Hi,
>> >
>> > We are porting VLC and dependency libraries to Symbian OS and this is a
>> > small patch which is a workaround to a Symbian OS limitation.
>> >
>> > --
>> > Pankaj Yadav
>> > http://people.videolan.org/~pk <http://people.videolan.org/%7Epk>
>> > Open Source Enthusiast
>> >
>> > From c09de83ea0a4ed13653e26296d5bd5b20db93e31 Mon Sep 17 00:00:00 2001
>> > From: Pankaj Yadav <pk at videolan.org>
>> > Date: Mon, 24 Jan 2011 18:01:03 +0530
>> > Subject: [PATCH] Symbian OS won't load binaries which have a function pointer assigned directly using a library routine
>> >
>> > ---
>> > libavutil/eval.c | 84 ++++++++++++++++++++++++++++++++++++++++++++++--------
>> > 1 files changed, 72 insertions(+), 12 deletions(-)
>> >
>> > diff --git a/libavutil/eval.c b/libavutil/eval.c
>> > index 0fef97b..a5b7dc7 100644
>> > --- a/libavutil/eval.c
>> > +++ b/libavutil/eval.c
>> > @@ -71,6 +71,66 @@ static const int8_t si_prefixes['z' - 'E' + 1] = {
>> > ['Y'-'E']= 24,
>> > };
>> >
>> > +static double staticsin(double a)
>> > +{
>> > + return sin(a);
>> > +}
>> > +
>>
>> [...]
>>
>> > double av_strtod(const char *numstr, char **tail)
>> > {
>> > double d;
>> > @@ -250,18 +310,18 @@ static int parse_primary(AVExpr **e, Parser *p)
>> > p->s++; // ")"
>> >
>> > d->type = e_func0;
>> > - if (strmatch(next, "sinh" )) d->a.func0 = sinh;
>> > - else if (strmatch(next, "cosh" )) d->a.func0 = cosh;
>> > - else if (strmatch(next, "tanh" )) d->a.func0 = tanh;
>> > - else if (strmatch(next, "sin" )) d->a.func0 = sin;
>> > - else if (strmatch(next, "cos" )) d->a.func0 = cos;
>> > - else if (strmatch(next, "tan" )) d->a.func0 = tan;
>> > - else if (strmatch(next, "atan" )) d->a.func0 = atan;
>> > - else if (strmatch(next, "asin" )) d->a.func0 = asin;
>> > - else if (strmatch(next, "acos" )) d->a.func0 = acos;
>> > - else if (strmatch(next, "exp" )) d->a.func0 = exp;
>> > - else if (strmatch(next, "log" )) d->a.func0 = log;
>> > - else if (strmatch(next, "abs" )) d->a.func0 = fabs;
>> > + if (strmatch(next, "sinh" )) d->a.func0 = staticsinh;
>> > + else if (strmatch(next, "cosh" )) d->a.func0 = staticcosh;
>> > + else if (strmatch(next, "tanh" )) d->a.func0 = statictanh;
>> > + else if (strmatch(next, "sin" )) d->a.func0 = staticsin;
>> > + else if (strmatch(next, "cos" )) d->a.func0 = staticcos;
>> > + else if (strmatch(next, "tan" )) d->a.func0 = statictan;
>> > + else if (strmatch(next, "atan" )) d->a.func0 = staticatan;
>> > + else if (strmatch(next, "asin" )) d->a.func0 = staticasin;
>> > + else if (strmatch(next, "acos" )) d->a.func0 = staticacos;
>> > + else if (strmatch(next, "exp" )) d->a.func0 = staticexp;
>> > + else if (strmatch(next, "log" )) d->a.func0 = staticlog;
>> > + else if (strmatch(next, "abs" )) d->a.func0 = staticfabs;
>> > else if (strmatch(next, "squish")) d->type = e_squish;
>> > else if (strmatch(next, "gauss" )) d->type = e_gauss;
>> > else if (strmatch(next, "mod" )) d->type = e_mod;
>>
>> This is ridiculous. What is the reason for this crazy limitation?
>
>i dont like you mans but i agree this is crazy
>
>maybe its something with a missing linked in lib? and this works
>because macros get used or something in that direction i dont know exactly
i think ffmpeg has a rule to keep OS hacks out of the code as much as
possible.
wasnt there a plan to have liboshacks or so?
-compn
More information about the ffmpeg-devel
mailing list