-static av_cold int mp_decode_end(AVCodecContext *avctx)
-{
- MotionPixelsContext *mp = avctx->priv_data;
-
- av_freep(&mp->changes_map);
- av_freep(&mp->vpt);
- av_freep(&mp->hpt);
- av_freep(&mp->bswapbuf);
- if (mp->frame.data[0])
- avctx->release_buffer(avctx, &mp->frame);
-
- return 0;
-}
-
-AVCodec motionpixels_decoder = {
- "motionpixels",
- CODEC_TYPE_VIDEO,
- CODEC_ID_MOTIONPIXELS,
- sizeof(MotionPixelsContext),
- mp_decode_init,
- NULL,
- mp_decode_end,
- mp_decode_frame,
- CODEC_CAP_DR1,
- .long_name = NULL_IF_CONFIG_SMALL("Motion Pixels video"),
+AVCodec ff_motionpixels_decoder = {
+ .name = "motionpixels",
+ .long_name = NULL_IF_CONFIG_SMALL("Motion Pixels video"),
+ .type = AVMEDIA_TYPE_VIDEO,
+ .id = AV_CODEC_ID_MOTIONPIXELS,
+ .priv_data_size = sizeof(MotionPixelsContext),
+ .init = mp_decode_init,
+ .close = mp_decode_end,
+ .decode = mp_decode_frame,
+ .capabilities = AV_CODEC_CAP_DR1,