]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/vf_showinfo.c
nut: add 12/14 bit yuv to nut/raw
[ffmpeg] / libavfilter / vf_showinfo.c
index 657e6e6df2245669dc5675d733bceb03325eaccd..2c03177f1e604d4a65f03dd97a152de1911dd627 100644 (file)
 #include "libavutil/pixdesc.h"
 #include "libavutil/timestamp.h"
 #include "avfilter.h"
+#include "internal.h"
+#include "video.h"
 
 typedef struct {
     unsigned int frame;
 } ShowInfoContext;
 
-static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque)
+static av_cold int init(AVFilterContext *ctx, const char *args)
 {
     ShowInfoContext *showinfo = ctx->priv;
     showinfo->frame = 0;
@@ -79,7 +81,8 @@ static void end_frame(AVFilterLink *inlink)
     av_log(ctx, AV_LOG_INFO, "]\n");
 
     showinfo->frame++;
-    avfilter_end_frame(inlink->dst->outputs[0]);
+    avfilter_unref_buffer(picref);
+    ff_end_frame(inlink->dst->outputs[0]);
 }
 
 AVFilter avfilter_vf_showinfo = {
@@ -91,8 +94,8 @@ AVFilter avfilter_vf_showinfo = {
 
     .inputs    = (const AVFilterPad[]) {{ .name       = "default",
                                     .type             = AVMEDIA_TYPE_VIDEO,
-                                    .get_video_buffer = avfilter_null_get_video_buffer,
-                                    .start_frame      = avfilter_null_start_frame,
+                                    .get_video_buffer = ff_null_get_video_buffer,
+                                    .start_frame      = ff_null_start_frame_keep_ref,
                                     .end_frame        = end_frame,
                                     .min_perms        = AV_PERM_READ, },
                                   { .name = NULL}},