aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-05-18 00:01:40 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-05-18 00:01:40 +0200
commit9132f2ad0c064b5cebfc0e7ad562ac0cfd67a79e (patch)
treef57bccedcb71d38ca12b0f4fffea49a6f371d309 /libavutil
parent3d922c84622e7bf8603390b154630c3d62b93b12 (diff)
downloadffmpeg-9132f2ad0c064b5cebfc0e7ad562ac0cfd67a79e.tar.gz
eval: opensolaris strtod() cannot handle 0x1234
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/eval.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavutil/eval.c b/libavutil/eval.c
index 98b4e0ac52..9271fd6cbc 100644
--- a/libavutil/eval.c
+++ b/libavutil/eval.c
@@ -75,7 +75,10 @@ double av_strtod(const char *numstr, char **tail)
{
double d;
char *next;
- d = strtod(numstr, &next);
+ if(numstr[0]=='0' && (numstr[1]|0x20)=='x') {
+ d = strtol(numstr, &next, 16);
+ } else
+ d = strtod(numstr, &next);
/* if parsing succeeded, check for and interpret postfixes */
if (next!=numstr) {
if (*next >= 'E' && *next <= 'z') {