]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/vf_transpose.c
overlay: clear cur_buf on main input link.
[ffmpeg] / libavfilter / vf_transpose.c
index 3ac07f58703b87b82b0d4625b4a79baf4fe95474..b5a742c161b7a0407c91281dcc285ad9c8d5ce7e 100644 (file)
@@ -30,6 +30,7 @@
 #include "libavutil/imgutils.h"
 #include "avfilter.h"
 #include "formats.h"
+#include "internal.h"
 #include "video.h"
 
 typedef struct {
@@ -43,7 +44,7 @@ typedef struct {
     int dir;
 } TransContext;
 
-static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque)
+static av_cold int init(AVFilterContext *ctx, const char *args)
 {
     TransContext *trans = ctx->priv;
     trans->dir = 0;
@@ -106,7 +107,7 @@ static int config_props_output(AVFilterLink *outlink)
     } else
         outlink->sample_aspect_ratio = inlink->sample_aspect_ratio;
 
-    av_log(ctx, AV_LOG_INFO, "w:%d h:%d dir:%d -> w:%d h:%d rotation:%s vflip:%d\n",
+    av_log(ctx, AV_LOG_VERBOSE, "w:%d h:%d dir:%d -> w:%d h:%d rotation:%s vflip:%d\n",
            inlink->w, inlink->h, trans->dir, outlink->w, outlink->h,
            trans->dir == 1 || trans->dir == 3 ? "clockwise" : "counterclockwise",
            trans->dir == 0 || trans->dir == 3);
@@ -117,8 +118,8 @@ static void start_frame(AVFilterLink *inlink, AVFilterBufferRef *picref)
 {
     AVFilterLink *outlink = inlink->dst->outputs[0];
 
-    outlink->out_buf = avfilter_get_video_buffer(outlink, AV_PERM_WRITE,
-                                                 outlink->w, outlink->h);
+    outlink->out_buf = ff_get_video_buffer(outlink, AV_PERM_WRITE,
+                                           outlink->w, outlink->h);
     outlink->out_buf->pts = picref->pts;
 
     if (picref->video->sample_aspect_ratio.num == 0) {
@@ -188,10 +189,8 @@ static void end_frame(AVFilterLink *inlink)
         }
     }
 
-    avfilter_unref_buffer(inpic);
     ff_draw_slice(outlink, 0, outpic->video->h, 1);
     ff_end_frame(outlink);
-    avfilter_unref_buffer(outpic);
 }
 
 static void null_draw_slice(AVFilterLink *link, int y, int h, int slice_dir) { }