Welcome! Log In Create A New Profile

Advanced

Re: [patch][bugfix]Http mp4: replace strtod() with improved ngx_atofp() because precision problem.

Maxim Dounin
October 26, 2016 08:32AM
Hello!

On Wed, Oct 26, 2016 at 05:10:25PM +0800, 胡聪 (hucc) wrote:

> On Wed, Oct 26, 2016 3:34 AM, Maxim Dounin wrote:
>
> >Using strtod() should be avoided as it has other problems, see
> >https://trac.nginx.org/nginx/ticket/475. That is, an additional
> >variant of ngx_atofp() is a way to go.
> >
> >
> >Last time we've looked into this, we've stumbled upon selecting a
> >proper name for the additional function. Looking into this again
> >I tend to think that proper solution would be to use a special
> >function withing the ngx_http_mp4_module itself. Patch below.
>
>
> VOD (video on demand) module which support requesting time range
> also need the special function, so i would like to see that nginx-devel
> add a function in Core, that would be helpful. Possible patch below.

If you mean https://github.com/kaltura/nginx-vod-module, then I
don't think it does. Quick look suggests that it uses
milliseconds to specify times instead, and uses ngx_atoi() to
parse them. It doesn't use strtod() at all, and the only place it
uses ngx_atofp() now is to parse rate, and I don't think there are
reasons to allow arbitrary numbers like in the mp4 case.

The main problem with mp4 was that there were existing Flash
clients nginx has to be compatible with, and some of them used to
send incorrect start time specifications. It is highly unlikely
that the same unique situation affects other modules.

--
Maxim Dounin
http://nginx.org/

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[patch][bugfix]Http mp4: replace strtod() with improved ngx_atofp() because precision problem.

月耳 547 October 13, 2016 04:48AM

Re: [patch][bugfix]Http mp4: replace strtod() with improved ngx_atofp() because precision problem.

Maxim Dounin 201 October 18, 2016 02:28PM

Re: [patch][bugfix]Http mp4: replace strtod() with improved ngx_atofp() because precision problem.

胡聪 (hucc) 225 October 19, 2016 02:46AM

Re: [patch][bugfix]Http mp4: replace strtod() with improved ngx_atofp() because precision problem.

Maxim Dounin 296 October 25, 2016 03:36PM

Re: [patch][bugfix]Http mp4: replace strtod() with improved ngx_atofp() because precision problem.

胡聪 (hucc) 189 October 26, 2016 05:12AM

Re: [patch][bugfix]Http mp4: replace strtod() with improved ngx_atofp() because precision problem.

Maxim Dounin 190 October 26, 2016 08:32AM

Re: [patch][bugfix]Http mp4: replace strtod() with improved ngx_atofp() because precision problem.

胡聪 (hucc) 197 October 26, 2016 05:48AM

Re: [patch][bugfix]Http mp4: replace strtod() with improved ngx_atofp() because precision problem.

胡聪 (hucc) 194 October 26, 2016 12:42PM

Re: [patch][bugfix]Http mp4: replace strtod() with improved ngx_atofp() because precision problem.

Maxim Dounin 215 October 26, 2016 01:58PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 251
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready