]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/vf_fieldmatch.c
avfilter/af_dcshift: add direct path
[ffmpeg] / libavfilter / vf_fieldmatch.c
index 54a2c7aa60a218e249d16f0895c66a740f2cd16a..3694f26d33fed9026e3d63eda5198e4f06d35954 100644 (file)
@@ -72,7 +72,7 @@ enum comb_dbg {
     NB_COMBDBG
 };
 
-typedef struct {
+typedef struct FieldMatchContext {
     const AVClass *class;
 
     AVFrame *prv,  *src,  *nxt;     ///< main sliding window of 3 frames
@@ -904,17 +904,24 @@ static av_cold int fieldmatch_init(AVFilterContext *ctx)
         .filter_frame = filter_frame,
         .config_props = config_input,
     };
+    int ret;
 
     if (!pad.name)
         return AVERROR(ENOMEM);
-    ff_insert_inpad(ctx, INPUT_MAIN, &pad);
+    if ((ret = ff_insert_inpad(ctx, INPUT_MAIN, &pad)) < 0) {
+        av_freep(&pad.name);
+        return ret;
+    }
 
     if (fm->ppsrc) {
         pad.name = av_strdup("clean_src");
         pad.config_props = NULL;
         if (!pad.name)
             return AVERROR(ENOMEM);
-        ff_insert_inpad(ctx, INPUT_CLEANSRC, &pad);
+        if ((ret = ff_insert_inpad(ctx, INPUT_CLEANSRC, &pad)) < 0) {
+            av_freep(&pad.name);
+            return ret;
+        }
     }
 
     if ((fm->blockx & (fm->blockx - 1)) ||