}
if ((ret = ff_snow_common_init(avctx)) < 0) {
- ff_snow_common_end(avctx->priv_data);
return ret;
}
ff_mpegvideoencdsp_init(&s->mpvencdsp, avctx);
ff_snow_frame_start(s);
av_frame_unref(avctx->coded_frame);
- av_frame_ref(avctx->coded_frame, s->current_picture);
+ ret = av_frame_ref(avctx->coded_frame, s->current_picture);
+ if (ret < 0)
+ return ret;
s->m.current_picture_ptr= &s->m.current_picture;
s->m.current_picture.f = s->current_picture;
AV_PIX_FMT_NONE
},
.priv_class = &snowenc_class,
+ .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
+ FF_CODEC_CAP_INIT_CLEANUP,
};