if ((flags & 1)) { st = av_new_stream(s, 0); if (!st) return AVERROR_NOMEM; st->codec.codec_type = CODEC_TYPE_VIDEO; st->codec.codec_id = CODEC_ID_FLV1; st->codec.frame_rate= FRAME_RATE_UNKNOWN;   }  if ((flags & 4)) { st = av_new_stream(s, 1); if (!st) return AVERROR_NOMEM; st->codec.codec_type = CODEC_TYPE_AUDIO; st->codec.codec_id = CODEC_ID_MP3; }
static int flv_read_header(AVFormatContext *s,                           AVFormatParameters *ap){    int offset, flags;    AVStream *st;        s->ctx_flags |= AVFMTCTX_NOHEADER; //ok we have a header but theres no fps, codec type, sample_rate, ...    av_set_pts_info(s, 24, 1, 1000); /* 24 bit pts in ms */    url_fskip(&s->pb, 4);    flags = get_byte(&s->pb);    if ((flags & 1)) {        st = av_new_stream(s, 0);        if (!st)            return AVERROR_NOMEM;        st->codec.codec_type = CODEC_TYPE_VIDEO;        st->codec.codec_id = CODEC_ID_FLV1;        st->codec.frame_rate= FRAME_RATE_UNKNOWN;//        st->codec.frame_rate= ap->frame_rate;//        st->codec.frame_rate_base= ap->frame_rate_base;    }    if ((flags & 4)) {        st = av_new_stream(s, 1);        if (!st)            return AVERROR_NOMEM;        st->codec.codec_type = CODEC_TYPE_AUDIO;        st->codec.codec_id = CODEC_ID_MP3;    }    offset = get_be32(&s->pb);    url_fseek(&s->pb, offset, SEEK_SET);    return 0;}