Ticket #266: mp4_fix_empty_mdat.patch

File mp4_fix_empty_mdat.patch, 576 bytes (added by Gernot Vormayr, 14 years ago)

set file_last of mdat atom to file end if atom size is 0

  • src/http/modules/ngx_http_mp4_module.c

    old new  
    10751075    data->in_file = 1;
    10761076    data->last_buf = 1;
    10771077    data->last_in_chain = 1;
    1078     data->file_last = mp4->offset + atom_data_size;
     1078    if (atom_data_size) {
     1079        data->file_last = mp4->offset + atom_data_size;
     1080    } else {
     1081        data->file_last = mp4->end;
     1082    }
    10791083
    10801084    mp4->mdat_atom.buf = &mp4->mdat_atom_buf;
    10811085    mp4->mdat_atom.next = &mp4->mdat_data;