All pastes #2537967 Raw Edit

Something

public unlisted c v1 · immutable
#2537967 ·published 2014-01-14 12:46 UTC
rendered paste body
static int mov_read_header(AVFormatContext *s){    MOVContext *mov = s->priv_data;    AVIOContext *pb = s->pb;    int i, j, err;    MOVAtom atom = { AV_RL32("root") };    mov->fc = s;    /* .mov and .mp4 aren't streamable anyway (only progressive download if moov is before mdat) */    if (pb->seekable)        atom.size = avio_size(pb);    else        atom.size = INT64_MAX;    /* check MOV header */    if ((err = mov_read_default(mov, pb, atom)) < 0) {        av_log(s, AV_LOG_ERROR, "error reading header: %d\n", err);        mov_read_close(s);        return err;    }    if (!mov->found_moov) {        av_log(s, AV_LOG_ERROR, "moov atom not found\n");        mov_read_close(s);        return AVERROR_INVALIDDATA;    }