int unknown= get_le32(pb); int id= get_le32(pb); int whole= get_le32(pb);
int id, whole;
static int fourxm_read_packet(AVFormatContext *s,                             AVPacket *pkt){    FourxmDemuxContext *fourxm = s->priv_data;    ByteIOContext *pb = &s->pb;    unsigned int fourcc_tag;    unsigned int size;    int ret = 0;    int track_number;    int packet_read = 0;    while (!packet_read) {        fourcc_tag = get_be32(pb);        size = get_le32(pb);        if (fourcc_tag == LIST_TAG) {            /* skip the LIST-FRAM tag and get the next fourcc */            get_be32(pb);            fourcc_tag = get_be32(pb);            size = get_le32(pb);        }        if (url_feof(pb))            return -EIO;        switch (fourcc_tag) {        case ifrm_TAG:printf (" %cfrm chunk\n", (char)(fourcc_tag >> 24) & 0xFF);url_fseek(pb, size, SEEK_CUR);            break;        case pfrm_TAG:printf (" %cfrm chunk\n", (char)(fourcc_tag >> 24) & 0xFF);url_fseek(pb, size, SEEK_CUR);            break;        case cfrm_TAG:{int unknown= get_le32(pb);int id= get_le32(pb);int whole= get_le32(pb);static int stats[1000];stats[id] += size - 12;printf(" cfrm chunk id:%d size:%d whole:%d until now:%d\n", id, size, whole, stats[id]);url_fseek(pb, size-12, SEEK_CUR);            break;        }        case snd__TAG:printf (" snd_ chunk, ");            track_number = get_le32(pb);            size = get_le32(pb);            if (track_number == fourxm->selected_track) {printf ("correct track, dispatching...\n");                if (av_new_packet(pkt, size))                    return -EIO;                ret = get_buffer(&s->pb, pkt->data, size);                if (ret < 0)                    av_free_packet(pkt);                packet_read = 1;            } else {printf ("wrong track, skipping...\n");                url_fseek(pb, size, SEEK_CUR);            }            break;        default:            url_fseek(pb, size, SEEK_CUR);            break;        }    }    return ret;}