int width, height, raten, rated, aspectn, aspectd; char lacing;
int width=-1, height=-1, raten=0, rated=0, aspectn=0, aspectd=0,interlaced_frame=0,top_field_first=0; enum PixelFormat pix_fmt=PIX_FMT_NB,alt_pix_fmt=PIX_FMT_NB;
static int yuv4_read_header(AVFormatContext *s, AVFormatParameters *ap){    char header[MAX_YUV4_HEADER+1];    int i;    ByteIOContext *pb = &s->pb;    int width, height, raten, rated, aspectn, aspectd;    char lacing;    AVStream *st;        for (i=0; i<MAX_YUV4_HEADER; i++) {        header[i] = get_byte(pb);	if (header[i] == '\n') {	    header[i+1] = 0;	    break;	}    }    if (i == MAX_YUV4_HEADER) return -1;    if (strncmp(header, Y4M_MAGIC, strlen(Y4M_MAGIC))) return -1;    sscanf(header+strlen(Y4M_MAGIC), " W%d H%d F%d:%d I%c A%d:%d",           &width, &height, &raten, &rated, &lacing, &aspectn, &aspectd);        st = av_new_stream(s, 0);    st = s->streams[0];    st->codec.width = width;    st->codec.height = height;    av_reduce(&raten, &rated, raten, rated, (1UL<<31)-1);    st->codec.frame_rate = raten;    st->codec.frame_rate_base = rated;    st->codec.pix_fmt = PIX_FMT_YUV420P;    st->codec.codec_type = CODEC_TYPE_VIDEO;    st->codec.codec_id = CODEC_ID_RAWVIDEO;    st->codec.sample_aspect_ratio= (AVRational){aspectn, aspectd};    return 0;}