[FFmpeg-cvslog] eval: opensolaris strtod() cannot handle 0x1234
Michael Niedermayer
git at videolan.org
Wed May 18 00:09:50 CEST 2011
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed May 18 00:01:40 2011 +0200| [9132f2ad0c064b5cebfc0e7ad562ac0cfd67a79e] | committer: Michael Niedermayer
eval: opensolaris strtod() cannot handle 0x1234
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9132f2ad0c064b5cebfc0e7ad562ac0cfd67a79e
---
libavutil/eval.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/libavutil/eval.c b/libavutil/eval.c
index 98b4e0a..9271fd6 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') {
More information about the ffmpeg-cvslog
mailing list