stream->frame_rate = (float)codec->frame_rate / (float)FRAME_RATE_BASE;
stream->frame_rate = (float)codec->frame_rate / (float)codec->frame_rate_base;
static int rm_write_header(AVFormatContext *s){    RMContext *rm = s->priv_data;    StreamInfo *stream;    int n;    AVCodecContext *codec;    for(n=0;n<s->nb_streams;n++) {        s->streams[n]->id = n;        codec = &s->streams[n]->codec;        stream = &rm->streams[n];        memset(stream, 0, sizeof(StreamInfo));        stream->num = n;        stream->bit_rate = codec->bit_rate;        stream->enc = codec;        switch(codec->codec_type) {        case CODEC_TYPE_AUDIO:            rm->audio_stream = stream;            stream->frame_rate = (float)codec->sample_rate / (float)codec->frame_size;            /* XXX: dummy values */            stream->packet_max_size = 1024;            stream->nb_packets = 0;            stream->total_frames = stream->nb_packets;            break;        case CODEC_TYPE_VIDEO:            rm->video_stream = stream;            stream->frame_rate = (float)codec->frame_rate / (float)FRAME_RATE_BASE;            /* XXX: dummy values */            stream->packet_max_size = 4096;            stream->nb_packets = 0;            stream->total_frames = stream->nb_packets;            break;        default:            av_abort();        }    }    rv10_write_header(s, 0, 0);    put_flush_packet(&s->pb);    return 0;}