Changeset 5622:a23c35496c2f in nginx


Ignore:
Timestamp:
03/24/14 13:55:10 (3 years ago)
Author:
Sergey Kandaurov <pluknet@…>
Branch:
default
Message:

Mp4: skipped empty stss atom table in output.

The atom may have no data entries after cropping.

This fixes "zero size buf in output" alerts.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/http/modules/ngx_http_mp4_module.c

    r5621 r5622  
    22742274    ngx_http_mp4_crop_stss_data(mp4, trak, 0);
    22752275
    2276     entry = (uint32_t *) data->pos;
    2277     end = (uint32_t *) data->last;
    2278 
    2279     start_sample = trak->start_sample;
    2280 
    2281     while (entry < end) {
    2282         sample = ngx_mp4_get_32value(entry);
    2283         sample -= start_sample;
    2284         ngx_mp4_set_32value(entry, sample);
    2285         entry++;
     2276    if (trak->sync_samples_entries) {
     2277        entry = (uint32_t *) data->pos;
     2278        end = (uint32_t *) data->last;
     2279
     2280        start_sample = trak->start_sample;
     2281
     2282        while (entry < end) {
     2283            sample = ngx_mp4_get_32value(entry);
     2284            sample -= start_sample;
     2285            ngx_mp4_set_32value(entry, sample);
     2286            entry++;
     2287        }
     2288
     2289    } else {
     2290        trak->out[NGX_HTTP_MP4_STSS_DATA].buf = NULL;
    22862291    }
    22872292
Note: See TracChangeset for help on using the changeset viewer.