]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/vb.c
doc/filters: Documentation to add sess_config option for tensorflow backend
[ffmpeg] / libavcodec / vb.c
index d9c6b93a7376fa5e5467703e069bfab56e8ff733..f5b7f89853f1d861a81ae6c873356bc365f26952 100644 (file)
@@ -262,11 +262,8 @@ static av_cold int decode_init(AVCodecContext *avctx)
     c->frame      = av_mallocz(avctx->width * avctx->height);
     c->prev_frame = av_mallocz(avctx->width * avctx->height);
 
-    if (!c->frame || !c->prev_frame) {
-        av_freep(&c->frame);
-        av_freep(&c->prev_frame);
+    if (!c->frame || !c->prev_frame)
         return AVERROR(ENOMEM);
-    }
 
     return 0;
 }
@@ -281,7 +278,7 @@ static av_cold int decode_end(AVCodecContext *avctx)
     return 0;
 }
 
-AVCodec ff_vb_decoder = {
+const AVCodec ff_vb_decoder = {
     .name           = "vb",
     .long_name      = NULL_IF_CONFIG_SMALL("Beam Software VB"),
     .type           = AVMEDIA_TYPE_VIDEO,
@@ -291,4 +288,5 @@ AVCodec ff_vb_decoder = {
     .close          = decode_end,
     .decode         = decode_frame,
     .capabilities   = AV_CODEC_CAP_DR1,
+    .caps_internal  = FF_CODEC_CAP_INIT_CLEANUP,
 };