Opened 11 years ago

Closed 8 years ago

#475 closed defect (fixed)

http_mp4_module seeking problem: "start time is out mp4 stts samples"

Reported by: MP4Man Owned by: Roman Arutyunyan
Priority: minor Milestone:
Component: nginx-module Version:
Keywords: Cc:
uname -a: Linux xvs.tt 2.6.32-279.el6.i686 #1 SMP Fri Jun 22 10:59:55 UTC 2012 i686 i686 i386 GNU/Linux
nginx -V: nginx version: nginx/1.5.7
built by gcc 4.4.6 20120305 (Red Hat 4.4.6-4) (GCC)
TLS SNI support enabled
configure arguments: --with-http_mp4_module --with-http_stub_status_module --with-http_perl_module --add-module=../nginx-rtmp-module-master/ --add-module=../nginx-upload-progress-module-master --with-http_flv_module --with-debug

Description

Sometimes I have problem with seeking MP4 files. Files were post-processed to move ATOM data to the begining of file, so most of the times seeking works fine but sometimes I get error like this:
*6 start time is out mp4 stts samples in "/home/uploads/broljxe8iyse.mp4"
Interesting that if we retry same exactly request 2nd time it works fine.
Old 1.2.9 version looks working stable with this.
Full debug log attached.

Attachments (1)

mp4-bug-dump.txt (14.0 KB ) - added by MP4Man 11 years ago.

Download all attachments as: .zip

Change History (5)

by MP4Man, 11 years ago

Attachment: mp4-bug-dump.txt added

comment:1 by Maxim Dounin, 11 years ago

Owner: set to Roman Arutyunyan
Status: newassigned

Roman, could you please take a look?

comment:2 by Maxim Dounin, 11 years ago

Just for record: looking though debug log suggests that the problem is that strtod() use in mp4 module is wrong, as "start=" argument isn't null-terminated may be followed by arbitrary data after an internal redirect.

comment:3 by Maxim Dounin <mdounin@…>, 8 years ago

In 6782:b123eae3fd4e/nginx:

Mp4: introduced custom version of ngx_atofp().

This allows to correctly parse "start" and "end" arguments without
null-termination (ticket #475), and also fixes rounding errors observed
with strtod() when using i387 instructions.

comment:4 by Maxim Dounin, 8 years ago

Resolution: fixed
Status: assignedclosed

Fix committed.

Note: See TracTickets for help on using tickets.