]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/vf_decimate.c
lavfi: guess a timestamp for compat status change.
[ffmpeg] / libavfilter / vf_decimate.c
index 1fb242a3ae542ca4d20c4a02b16a0dcad692d8a1..53347c7f10936fd42754417e2b3fcb8c0d097826 100644 (file)
@@ -34,7 +34,7 @@ struct qitem {
     int64_t totdiff;
 };
 
-typedef struct {
+typedef struct DecimateContext {
     const AVClass *class;
     struct qitem *queue;    ///< window of cycle frames and the associated data diff
     int fid;                ///< current frame id in the queue
@@ -276,17 +276,24 @@ static av_cold int decimate_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 (dm->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 ((dm->blockx & (dm->blockx - 1)) ||