Roman Arutyunyan 6e8ccee062 Mp4: prevent chunk index underflow.
When cropping stsc atom, it's assumed that chunk index is never 0.
Based on this assumption, start_chunk and end_chunk are calculated
by subtracting 1 from it.  If chunk index is zero, start_chunk or
end_chunk may underflow, which will later trigger
"start/end time is out mp4 stco chunks" error.  The change adds an
explicit check for zero chunk index to avoid underflow and report
a proper error.

Zero chunk index is explicitly banned in ISO/IEC 14496-12, 8.7.4
Sample To Chunk Box.  It's also implicitly banned in QuickTime File
Format specification.  Description of chunk offset table references
"Chunk 1" as the first table element.
2025-02-05 19:27:05 +04:00
2021-10-25 20:49:15 +03:00
2025-02-05 19:27:05 +04:00
2025-02-05 19:27:05 +04:00
2025-02-05 19:27:05 +04:00
2024-08-12 18:28:31 +04:00
2025-02-05 19:27:05 +04:00
2025-02-05 19:27:05 +04:00

Documentation is available at http://nginx.org

Description
An official read-only mirror of http://hg.nginx.org/nginx/ which is updated hourly. Pull requests on GitHub cannot be accepted and will be automatically closed. The proper way to submit changes to nginx is via the nginx development mailing list, see http://nginx.org/en/docs/contributing_changes.html
Readme 78 MiB
Languages
C 97.6%
Vim Script 1.8%
XS 0.4%
Perl 0.1%