[PATCH] Mp4: fixed setting wrong mdat atom size in very rare cases.
Maxim Dounin
mdounin at mdounin.ru
Mon Nov 21 13:07:27 UTC 2016
Hello!
On Mon, Nov 21, 2016 at 05:40:52PM +0800, 胡聪 (hucc) wrote:
> Hi,
>
> # HG changeset patch
> # User hucongcong <hucong.c at foxmail.com>
> # Date 1479719580 -28800
> # Mon Nov 21 17:13:00 2016 +0800
> # Node ID f43feabe2e45ec102ffbe36428ccb504ff1526d2
> # Parent 6a26016e9a138102798a7ec3e74747fbd6018f82
> Mp4: fixed setting wrong mdat atom size in very rare cases.
>
> diff -r 6a26016e9a13 -r f43feabe2e45 src/http/modules/ngx_http_mp4_module.c
> --- a/src/http/modules/ngx_http_mp4_module.c Tue Nov 15 18:11:46 2016 +0300
> +++ b/src/http/modules/ngx_http_mp4_module.c Mon Nov 21 17:13:00 2016 +0800
> @@ -1229,7 +1229,7 @@ ngx_http_mp4_update_mdat_atom(ngx_http_m
>
> atom_header = mp4->mdat_atom_header;
>
> - if ((uint64_t) atom_data_size > (uint64_t) 0xffffffff) {
> + if ((uint64_t) atom_data_size > (uint64_t) 0xfffffff7) {
> atom_size = 1;
> atom_header_size = sizeof(ngx_mp4_atom_header64_t);
> ngx_mp4_set_64value(atom_header + sizeof(ngx_mp4_atom_header_t),
You may want to elaborate more about what are you trying to fix
here.
Current code uses 32-bit atom headers for sizes up to maximum
unsigned 32-bit value, 0xffffffff. And this seems to perfectly
agree with the specification.
--
Maxim Dounin
http://nginx.org/
More information about the nginx-devel
mailing list