ByteIOContext *pb = &s->pb; uint32_t tag, tag1, handler; int codec_type, stream_index, frame_period, bit_rate, scale, rate; unsigned int size, nb_frames; int table_entries; int i, n, err; AVStream *st; NSVStream *ast;
int i, err;
static int nsv_read_header(AVFormatContext *s, AVFormatParameters *ap){    NSVContext *nsv = s->priv_data;    ByteIOContext *pb = &s->pb;    uint32_t tag, tag1, handler;    int codec_type, stream_index, frame_period, bit_rate, scale, rate;    unsigned int size, nb_frames;    int table_entries;    int i, n, err;    AVStream *st;    NSVStream *ast;    PRINT(("%s()\n", __FUNCTION__));    PRINT(("filename '%s'\n", s->filename));    nsv->state = NSV_UNSYNC;    nsv->ahead[0].data = nsv->ahead[1].data = NULL;        for (i = 0; i < NSV_MAX_RESYNC_TRIES; i++) {        if (nsv_resync(s) < 0)            return -1;        if (nsv->state == NSV_FOUND_NSVF)            err = nsv_parse_NSVf_header(s, ap);            /* we need the first NSVs also... */        if (nsv->state == NSV_FOUND_NSVS) {            err = nsv_parse_NSVs_header(s, ap);            break; /* we just want the first one */        }    }    if (s->nb_streams < 1) /* no luck so far */        return -1;    /* now read the first chunk, so we can attempt to decode more info */    err = nsv_read_chunk(s, 1);        PRINT(("parsed header\n"));    return 0;}