]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/vf_decimate.c
Merge commit '111367263af41c88a44bd763ceefc11d53a7f655'
[ffmpeg] / libavfilter / vf_decimate.c
index 630f3ba49253cc1fc3ad74786d1120a43094a7ec..182f48b5b1a30471549f565ce03088b454d01e9d 100644 (file)
@@ -148,8 +148,10 @@ static av_cold void uninit(AVFilterContext *ctx)
 {
     DecimateContext *decimate = ctx->priv;
     av_frame_free(&decimate->ref);
-    avcodec_close(decimate->avctx);
-    av_freep(&decimate->avctx);
+    if (decimate->avctx) {
+        avcodec_close(decimate->avctx);
+        av_freep(&decimate->avctx);
+    }
 }
 
 static int query_formats(AVFilterContext *ctx)
@@ -242,8 +244,6 @@ static const AVFilterPad decimate_outputs[] = {
     { NULL }
 };
 
-static const char *const shorthand[] = { "max", "hi", "lo", "frac", NULL };
-
 AVFilter avfilter_vf_decimate = {
     .name        = "decimate",
     .description = NULL_IF_CONFIG_SMALL("Remove near-duplicate frames."),
@@ -255,5 +255,4 @@ AVFilter avfilter_vf_decimate = {
     .inputs        = decimate_inputs,
     .outputs       = decimate_outputs,
     .priv_class    = &decimate_class,
-    .shorthand     = shorthand,
 };