comparison src/http/modules/ngx_http_mp4_module.c @ 4105:b1e19ba949fa

Fixing building by gcc-4.7.
author Igor Sysoev <igor@sysoev.ru>
date Wed, 14 Sep 2011 15:25:46 +0000
parents 9ee6944590c0
children 637912848b08
comparison
equal deleted inserted replaced
4104:84f34973684c 4105:b1e19ba949fa
1700 static ngx_int_t 1700 static ngx_int_t
1701 ngx_http_mp4_read_stsd_atom(ngx_http_mp4_file_t *mp4, uint64_t atom_data_size) 1701 ngx_http_mp4_read_stsd_atom(ngx_http_mp4_file_t *mp4, uint64_t atom_data_size)
1702 { 1702 {
1703 u_char *atom_header, *atom_table; 1703 u_char *atom_header, *atom_table;
1704 size_t atom_size; 1704 size_t atom_size;
1705 uint32_t entries;
1706 ngx_buf_t *atom; 1705 ngx_buf_t *atom;
1707 ngx_mp4_stsd_atom_t *stsd_atom; 1706 ngx_mp4_stsd_atom_t *stsd_atom;
1708 ngx_http_mp4_trak_t *trak; 1707 ngx_http_mp4_trak_t *trak;
1709 1708
1710 /* sample description atom */ 1709 /* sample description atom */
1715 stsd_atom = (ngx_mp4_stsd_atom_t *) atom_header; 1714 stsd_atom = (ngx_mp4_stsd_atom_t *) atom_header;
1716 atom_size = sizeof(ngx_mp4_atom_header_t) + (size_t) atom_data_size; 1715 atom_size = sizeof(ngx_mp4_atom_header_t) + (size_t) atom_data_size;
1717 atom_table = atom_header + atom_size; 1716 atom_table = atom_header + atom_size;
1718 ngx_mp4_set_32value(stsd_atom->size, atom_size); 1717 ngx_mp4_set_32value(stsd_atom->size, atom_size);
1719 ngx_mp4_set_atom_name(stsd_atom, 's', 't', 's', 'd'); 1718 ngx_mp4_set_atom_name(stsd_atom, 's', 't', 's', 'd');
1720
1721 entries = ngx_mp4_get_32value(stsd_atom->entries);
1722 1719
1723 if ((uint64_t) (sizeof(ngx_mp4_stsd_atom_t) - sizeof(ngx_mp4_atom_header_t)) 1720 if ((uint64_t) (sizeof(ngx_mp4_stsd_atom_t) - sizeof(ngx_mp4_atom_header_t))
1724 > atom_data_size) { 1721 > atom_data_size) {
1725 ngx_log_error(NGX_LOG_ERR, mp4->file.log, 0, 1722 ngx_log_error(NGX_LOG_ERR, mp4->file.log, 0,
1726 "\"%s\" mp4 stsd atom too large", 1723 "\"%s\" mp4 stsd atom too large",