comparison src/http/modules/ngx_http_mp4_module.c @ 4088:8fe1da7b8386

bugfix of r4086: nginx could not be built without debug log.
author Igor Sysoev <igor@sysoev.ru>
date Fri, 09 Sep 2011 11:56:49 +0000
parents 3aa3b7bb9f0d
children e27670e1ab70
comparison
equal deleted inserted replaced
4087:3aa3b7bb9f0d 4088:8fe1da7b8386
702 702
703 adjustment = mp4->ftyp_size + mp4->moov_size 703 adjustment = mp4->ftyp_size + mp4->moov_size
704 + ngx_http_mp4_update_mdat_atom(mp4, start_offset) 704 + ngx_http_mp4_update_mdat_atom(mp4, start_offset)
705 - start_offset; 705 - start_offset;
706 706
707 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, mp4->file.log, 0, 707 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, mp4->file.log, 0,
708 "mp4 adjustment:%D", adjustment); 708 "mp4 adjustment:%D", adjustment);
709 709
710 for (i = 0; i < mp4->trak.nelts; i++) { 710 for (i = 0; i < mp4->trak.nelts; i++) {
711 ngx_http_mp4_adjust_stco_atom(mp4, &trak[i], (int32_t) adjustment); 711 ngx_http_mp4_adjust_stco_atom(mp4, &trak[i], (int32_t) adjustment);
712 } 712 }
792 atom_header = mp4->buffer_pos; 792 atom_header = mp4->buffer_pos;
793 } 793 }
794 794
795 atom_name = atom_header + sizeof(uint32_t); 795 atom_name = atom_header + sizeof(uint32_t);
796 796
797 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, mp4->file.log, 0, 797 ngx_log_debug4(NGX_LOG_DEBUG_HTTP, mp4->file.log, 0,
798 "mp4 atom: %*s @%O:%uL", 798 "mp4 atom: %*s @%O:%uL",
799 4, atom_name, mp4->offset, atom_size); 799 4, atom_name, mp4->offset, atom_size);
800 800
801 for (n = 0; atom[n].name; n++) { 801 for (n = 0; atom[n].name; n++) {
802 802
1024 1024
1025 atom_data_size = mp4->mdat_data.buf->file_last - start_offset; 1025 atom_data_size = mp4->mdat_data.buf->file_last - start_offset;
1026 mp4->mdat_data.buf->file_pos = start_offset; 1026 mp4->mdat_data.buf->file_pos = start_offset;
1027 mp4->content_length += atom_data_size; 1027 mp4->content_length += atom_data_size;
1028 1028
1029 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, mp4->file.log, 0, 1029 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, mp4->file.log, 0,
1030 "mdat new offset @%O:%O", start_offset, atom_data_size); 1030 "mdat new offset @%O:%O", start_offset, atom_data_size);
1031 1031
1032 atom_header = mp4->mdat_atom_header; 1032 atom_header = mp4->mdat_atom_header;
1033 1033
1034 if (atom_data_size > 0xffffffff) { 1034 if (atom_data_size > 0xffffffff) {
2107 end = (ngx_mp4_ctts_entry_t *) data->last; 2107 end = (ngx_mp4_ctts_entry_t *) data->last;
2108 2108
2109 while (entry < end) { 2109 while (entry < end) {
2110 count = ngx_mp4_get_32value(entry->count); 2110 count = ngx_mp4_get_32value(entry->count);
2111 2111
2112 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, mp4->file.log, 0, 2112 ngx_log_debug3(NGX_LOG_DEBUG_HTTP, mp4->file.log, 0,
2113 "start:%uD, count:%uD, offset:%uD", 2113 "start:%uD, count:%uD, offset:%uD",
2114 start_sample, count, ngx_mp4_get_32value(entry->offset)); 2114 start_sample, count, ngx_mp4_get_32value(entry->offset));
2115 2115
2116 if (start_sample <= count) { 2116 if (start_sample <= count) {
2117 count -= (start_sample - 1); 2117 count -= (start_sample - 1);