Revision fffa99dd

View differences:

libavformat/mov.c
75 75
    int64_t size; /* total size (excluding the size and type fields) */
76 76
} MOV_atom_t;
77 77

  
78
typedef struct {
79
    offset_t offset;
80
    int64_t size;
81
} MOV_mdat_t;
82

  
83 78
struct MOVParseTableEntry;
84 79

  
85 80
typedef struct MOVStreamContext {
......
118 113
    int found_moov; /* when both 'moov' and 'mdat' sections has been found */
119 114
    int found_mdat; /* we suppose we have enough data to read the file */
120 115
    AVPaletteControl palette_control;
121
    MOV_mdat_t *mdat_list;
122
    int mdat_count;
123 116
    DVDemuxContext *dv_demux;
124 117
    AVFormatContext *dv_fctx;
125 118
    int isom; /* 1 if file is ISO Media (mp4/3gp) */
......
317 310
{
318 311
    if(atom.size == 0) /* wrong one (MP4) */
319 312
        return 0;
320
    c->mdat_list = av_realloc(c->mdat_list, (c->mdat_count + 1) * sizeof(*c->mdat_list));
321
    c->mdat_list[c->mdat_count].offset = atom.offset;
322
    c->mdat_list[c->mdat_count].size = atom.size;
323
    c->mdat_count++;
324 313
    c->found_mdat=1;
325 314
    if(c->found_moov)
326 315
        return 1; /* found both, just go */
......
1498 1487
        av_freep(&sc->keyframes);
1499 1488
        av_freep(&sc->stts_data);
1500 1489
    }
1501
    av_freep(&mov->mdat_list);
1502 1490
    return 0;
1503 1491
}
1504 1492

  

Also available in: Unified diff