~ubuntu-branches/ubuntu/wily/nginx/wily-proposed

« back to all changes in this revision

Viewing changes to src/http/modules/ngx_http_mp4_module.c

  • Committer: Package Import Robot
  • Author(s): Dmitry Shachnev
  • Date: 2013-05-11 14:47:53 UTC
  • mfrom: (4.3.1 sid)
  • Revision ID: package-import@ubuntu.com-20130511144753-a65vqwrxy58omej4
Tags: 1.4.1-1ubuntu1
* Merge with Debian unstable (LP: #1177919). Remaining changes:
  - debian/conf/sites-available/default:
    + Modify default site configuration file to correct a typo
      that prevented out-of-the-box usability (LP: #1162177).
  - debian/patches/ubuntu-branding.patch:
    + Add ubuntu branding to server_tokens.
* Refresh all patches.

Show diffs side-by-side

added added

removed removed

Lines of Context:
586
586
    r->headers_out.status = NGX_HTTP_OK;
587
587
    r->headers_out.last_modified_time = of.mtime;
588
588
 
 
589
    if (ngx_http_set_etag(r) != NGX_OK) {
 
590
        return NGX_HTTP_INTERNAL_SERVER_ERROR;
 
591
    }
 
592
 
589
593
    if (ngx_http_set_content_type(r) != NGX_OK) {
590
594
        return NGX_HTTP_INTERNAL_SERVER_ERROR;
591
595
    }
750
754
 
751
755
    *prev = &mp4->mdat_atom;
752
756
 
 
757
    if (start_offset > mp4->mdat_data.buf->file_last) {
 
758
        ngx_log_error(NGX_LOG_ERR, mp4->file.log, 0,
 
759
                      "start time is out mp4 mdat atom in \"%s\"",
 
760
                      mp4->file.name.data);
 
761
        return NGX_ERROR;
 
762
    }
 
763
 
753
764
    adjustment = mp4->ftyp_size + mp4->moov_size
754
765
                 + ngx_http_mp4_update_mdat_atom(mp4, start_offset)
755
766
                 - start_offset;
1838
1849
                   ngx_mp4_get_32value(stsd_atom->entries),
1839
1850
                   4, stsd_atom->media_name);
1840
1851
 
1841
 
    /* supported media format: "avc1" (H.264) and "mp4a" (MPEG-4/AAC) */
1842
 
 
1843
 
    if (ngx_strncmp(stsd_atom->media_name, "avc1", 4) != 0
1844
 
        && ngx_strncmp(stsd_atom->media_name, "mp4a", 4) != 0)
1845
 
    {
1846
 
        return NGX_DECLINED;
1847
 
    }
1848
 
 
1849
1852
    trak = ngx_mp4_last_trak(mp4);
1850
1853
 
1851
1854
    atom = &trak->stsd_atom_buf;