printf("on_parse_exit_offset=%d\n", (int) url_ftell(pb));
av_log(NULL, AV_LOG_DEBUG, "on_parse_exit_offset=%d\n", (int) url_ftell(pb));
static int mov_read_header(AVFormatContext *s, AVFormatParameters *ap){    MOVContext *mov = (MOVContext *) s->priv_data;    ByteIOContext *pb = &s->pb;    int i, j, nb, err;    MOV_atom_t atom = { 0, 0, 0 };    mov->fc = s;    mov->parse_table = mov_default_parse_table;#if 0    /* XXX: I think we should auto detect */    if(s->iformat->name[1] == 'p')        mov->mp4 = 1;#endif    if(!url_is_streamed(pb)) /* .mov and .mp4 aren't streamable anyway (only progressive download if moov is before mdat) */	atom.size = url_filesize(url_fileno(pb));    else	atom.size = 0x7FFFFFFFFFFFFFFFLL;#ifdef DEBUG    printf("filesz=%Ld\n", atom.size);#endif    /* check MOV header */    err = mov_read_default(mov, pb, atom);    if (err<0 || (!mov->found_moov && !mov->found_mdat)) {	av_log(s, AV_LOG_ERROR, "mov: header not found !!! (err:%d, moov:%d, mdat:%d) pos:%lld\n",		err, mov->found_moov, mov->found_mdat, url_ftell(pb));	return -1;    }#ifdef DEBUG    printf("on_parse_exit_offset=%d\n", (int) url_ftell(pb));#endif    /* some cleanup : make sure we are on the mdat atom */    if(!url_is_streamed(pb) && (url_ftell(pb) != mov->mdat_offset))        url_fseek(pb, mov->mdat_offset, SEEK_SET);    mov->next_chunk_offset = mov->mdat_offset; /* initialise reading */#ifdef DEBUG    printf("mdat_reset_offset=%d\n", (int) url_ftell(pb));#endif#ifdef DEBUG    printf("streams= %d\n", s->nb_streams);#endif    mov->total_streams = nb = s->nb_streams;#if 1    for(i=0; i<s->nb_streams;) {        if(s->streams[i]->codec.codec_type == CODEC_TYPE_MOV_OTHER) {/* not audio, not video, delete */            av_free(s->streams[i]);            for(j=i+1; j<s->nb_streams; j++)                s->streams[j-1] = s->streams[j];            s->nb_streams--;        } else            i++;    }    for(i=0; i<s->nb_streams;i++) {        MOVStreamContext *sc;        sc = (MOVStreamContext *)s->streams[i]->priv_data;        sc->ffindex = i;        sc->is_ff_stream = 1;    }#endif#ifdef DEBUG    printf("real streams= %d\n", s->nb_streams);#endif    return 0;}