Mercurial > libavformat.hg
comparison mov.c @ 3160:1306bdb603c3 libavformat
indentation
author | bcoudurier |
---|---|
date | Fri, 21 Mar 2008 10:39:49 +0000 |
parents | 487b1979f195 |
children | 60be75aa8c47 |
comparison
equal
deleted
inserted
replaced
3159:06e340adefb8 | 3160:1306bdb603c3 |
---|---|
130 | 130 |
131 /* XXX: it's the first time I make a recursive parser I think... sorry if it's ugly :P */ | 131 /* XXX: it's the first time I make a recursive parser I think... sorry if it's ugly :P */ |
132 | 132 |
133 /* those functions parse an atom */ | 133 /* those functions parse an atom */ |
134 /* return code: | 134 /* return code: |
135 1: found what I wanted, exit | 135 1: found what I wanted, exit |
136 0: continue to parse next atom | 136 0: continue to parse next atom |
137 -1: error occured, exit | 137 -1: error occured, exit |
138 */ | 138 */ |
139 /* links atom IDs to parse functions */ | 139 /* links atom IDs to parse functions */ |
140 typedef struct MOVParseTableEntry { | 140 typedef struct MOVParseTableEntry { |
141 uint32_t type; | 141 uint32_t type; |
142 int (*parse)(MOVContext *ctx, ByteIOContext *pb, MOV_atom_t atom); | 142 int (*parse)(MOVContext *ctx, ByteIOContext *pb, MOV_atom_t atom); |
143 } MOVParseTableEntry; | 143 } MOVParseTableEntry; |
1563 | 1563 |
1564 /* check MOV header */ | 1564 /* check MOV header */ |
1565 err = mov_read_default(mov, pb, atom); | 1565 err = mov_read_default(mov, pb, atom); |
1566 if (err<0 || (!mov->found_moov && !mov->found_mdat)) { | 1566 if (err<0 || (!mov->found_moov && !mov->found_mdat)) { |
1567 av_log(s, AV_LOG_ERROR, "mov: header not found !!! (err:%d, moov:%d, mdat:%d) pos:%"PRId64"\n", | 1567 av_log(s, AV_LOG_ERROR, "mov: header not found !!! (err:%d, moov:%d, mdat:%d) pos:%"PRId64"\n", |
1568 err, mov->found_moov, mov->found_mdat, url_ftell(pb)); | 1568 err, mov->found_moov, mov->found_mdat, url_ftell(pb)); |
1569 return -1; | 1569 return -1; |
1570 } | 1570 } |
1571 dprintf(mov->fc, "on_parse_exit_offset=%d\n", (int) url_ftell(pb)); | 1571 dprintf(mov->fc, "on_parse_exit_offset=%d\n", (int) url_ftell(pb)); |
1572 | 1572 |
1573 return 0; | 1573 return 0; |