- st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- st->codec->codec_id = AV_CODEC_ID_VB;
- st->codec->codec_tag = MKTAG('V', 'B', 'V', '1');
- st->codec->width = width;
- st->codec->height = height;
- st->codec->pix_fmt = AV_PIX_FMT_PAL8;
- st->nb_frames =
- st->duration = c->frames;
+ st->codecpar->codec_type = AVMEDIA_TYPE_VIDEO;
+ st->codecpar->codec_id = AV_CODEC_ID_VB;
+ st->codecpar->codec_tag = MKTAG('V', 'B', 'V', '1');
+ st->codecpar->width = width;
+ st->codecpar->height = height;
+ st->codecpar->format = AV_PIX_FMT_PAL8;
+ st->nb_frames =
+ st->duration = c->frames;