st->codec.frame_rate = ap->frame_rate;
st->codec.frame_rate      = ap->frame_rate; st->codec.frame_rate_base = ap->frame_rate_base;
static int raw_read_header(AVFormatContext *s, AVFormatParameters *ap){    AVStream *st;    int id;    st = av_new_stream(s, 0);    if (!st)        return AVERROR_NOMEM;    if (ap) {        id = s->iformat->value;        if (id == CODEC_ID_RAWVIDEO) {            st->codec.codec_type = CODEC_TYPE_VIDEO;        } else {            st->codec.codec_type = CODEC_TYPE_AUDIO;        }        st->codec.codec_id = id;        switch(st->codec.codec_type) {        case CODEC_TYPE_AUDIO:            st->codec.sample_rate = ap->sample_rate;            st->codec.channels = ap->channels;            break;        case CODEC_TYPE_VIDEO:            st->codec.frame_rate = ap->frame_rate;            st->codec.width = ap->width;            st->codec.height = ap->height;            break;        default:            return -1;        }    } else {        return -1;    }    return 0;}