- st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- st->codec->codec_id = CODEC_ID_RAWVIDEO;
- st->codec->pix_fmt = PIX_FMT_RGBA;
- st->codec->codec_tag = 0; /* no fourcc */
- st->codec->width = avio_rb16(pb);
- st->codec->height = avio_rb16(pb);
+ st->codecpar->codec_type = AVMEDIA_TYPE_VIDEO;
+ st->codecpar->codec_id = AV_CODEC_ID_RAWVIDEO;
+ st->codecpar->format = AV_PIX_FMT_RGBA;
+ st->codecpar->codec_tag = 0; /* no fourcc */
+ st->codecpar->width = avio_rb16(pb);
+ st->codecpar->height = avio_rb16(pb);