case 32:
case 1: case 32:
static int decode_stream_header(NUTContext *nut){    AVFormatContext *s= nut->avf;    ByteIOContext *bc = &s->pb;    int class, nom, denom, stream_id;    uint64_t tmp;    AVStream *st;        get_packetheader(nut, bc, 1);    stream_id= get_v(bc);    if(stream_id >= nut->stream_count || s->streams[stream_id])        return -1;        st = av_new_stream(s, stream_id);    if (!st)        return AVERROR_NOMEM;    class = get_v(bc);    tmp = get_vb(bc);    st->codec.codec_tag= tmp;    switch(class)    {        case 0:            st->codec.codec_type = CODEC_TYPE_VIDEO;            st->codec.codec_id = codec_get_bmp_id(tmp);            if (st->codec.codec_id == CODEC_ID_NONE)                av_log(s, AV_LOG_ERROR, "Unknown codec?!\n");            break;        case 32:            st->codec.codec_type = CODEC_TYPE_AUDIO;            st->codec.codec_id = codec_get_wav_id(tmp);            if (st->codec.codec_id == CODEC_ID_NONE)                av_log(s, AV_LOG_ERROR, "Unknown codec?!\n");            break;        default:            av_log(s, AV_LOG_ERROR, "Unknown stream class (%d)\n", class);            return -1;    }    s->bit_rate += get_v(bc);    get_vb(bc); /* language code */    nom = get_v(bc);    denom = get_v(bc);    nut->stream[stream_id].msb_timestamp_shift = get_v(bc);    st->codec.has_b_frames=    nut->stream[stream_id].decode_delay= get_v(bc);    get_byte(bc); /* flags */    /* codec specific data headers */    while(get_v(bc) != 0){        st->codec.extradata_size= get_v(bc);        if((unsigned)st->codec.extradata_size > (1<<30))            return -1;        st->codec.extradata= av_mallocz(st->codec.extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);        get_buffer(bc, st->codec.extradata, st->codec.extradata_size);            //	    url_fskip(bc, get_v(bc));    }        if (class == 0) /* VIDEO */    {        st->codec.width = get_v(bc);        st->codec.height = get_v(bc);        st->codec.sample_aspect_ratio.num= get_v(bc);        st->codec.sample_aspect_ratio.den= get_v(bc);        get_v(bc); /* csp type */    }    if (class == 32) /* AUDIO */    {        st->codec.sample_rate = get_v(bc);        get_v(bc); // samplerate_den        st->codec.channels = get_v(bc);    }    if(check_checksum(bc)){        av_log(s, AV_LOG_ERROR, "Stream header %d checksum mismatch\n", stream_id);        return -1;    }    av_set_pts_info(s->streams[stream_id], 60, denom, nom);    nut->stream[stream_id].rate_num= nom;    nut->stream[stream_id].rate_den= denom;    return 0;}