Explicitely define get_video_buffer() callbacks in the format,
authorStefano Sabatini <stefano.sabatini-lala@poste.it>
Tue, 3 Nov 2009 22:04:55 +0000 (22:04 +0000)
committerStefano Sabatini <stefano.sabatini-lala@poste.it>
Tue, 3 Nov 2009 22:04:55 +0000 (22:04 +0000)
noformat and null filters.

Originally committed as revision 20443 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavfilter/vf_format.c
libavfilter/vf_null.c

index d80762b..97814c0 100644 (file)
@@ -96,6 +96,12 @@ static int query_formats_noformat(AVFilterContext *ctx)
     return 0;
 }
 
     return 0;
 }
 
+static AVFilterPicRef *get_video_buffer(AVFilterLink *link, int perms,
+                                        int w, int h)
+{
+    return avfilter_get_video_buffer(link->dst->outputs[0], perms, w, h);
+}
+
 static void start_frame(AVFilterLink *link, AVFilterPicRef *picref)
 {
     avfilter_start_frame(link->dst->outputs[0], picref);
 static void start_frame(AVFilterLink *link, AVFilterPicRef *picref)
 {
     avfilter_start_frame(link->dst->outputs[0], picref);
@@ -123,6 +129,7 @@ AVFilter avfilter_vf_format = {
 
     .inputs    = (AVFilterPad[]) {{ .name            = "default",
                                     .type            = CODEC_TYPE_VIDEO,
 
     .inputs    = (AVFilterPad[]) {{ .name            = "default",
                                     .type            = CODEC_TYPE_VIDEO,
+                                    .get_video_buffer= get_video_buffer,
                                     .start_frame     = start_frame,
                                     .draw_slice      = draw_slice,
                                     .end_frame       = end_frame, },
                                     .start_frame     = start_frame,
                                     .draw_slice      = draw_slice,
                                     .end_frame       = end_frame, },
@@ -144,6 +151,7 @@ AVFilter avfilter_vf_noformat = {
 
     .inputs    = (AVFilterPad[]) {{ .name            = "default",
                                     .type            = CODEC_TYPE_VIDEO,
 
     .inputs    = (AVFilterPad[]) {{ .name            = "default",
                                     .type            = CODEC_TYPE_VIDEO,
+                                    .get_video_buffer= get_video_buffer,
                                     .start_frame     = start_frame,
                                     .draw_slice      = draw_slice,
                                     .end_frame       = end_frame, },
                                     .start_frame     = start_frame,
                                     .draw_slice      = draw_slice,
                                     .end_frame       = end_frame, },
index 3724ac7..582708c 100644 (file)
 
 #include "avfilter.h"
 
 
 #include "avfilter.h"
 
+static AVFilterPicRef *get_video_buffer(AVFilterLink *link, int perms,
+                                        int w, int h)
+{
+    return avfilter_get_video_buffer(link->dst->outputs[0], perms, w, h);
+}
+
 static void start_frame(AVFilterLink *link, AVFilterPicRef *picref)
 {
     avfilter_start_frame(link->dst->outputs[0], picref);
 static void start_frame(AVFilterLink *link, AVFilterPicRef *picref)
 {
     avfilter_start_frame(link->dst->outputs[0], picref);
@@ -41,6 +47,7 @@ AVFilter avfilter_vf_null = {
 
     .inputs    = (AVFilterPad[]) {{ .name             = "default",
                                     .type             = CODEC_TYPE_VIDEO,
 
     .inputs    = (AVFilterPad[]) {{ .name             = "default",
                                     .type             = CODEC_TYPE_VIDEO,
+                                    .get_video_buffer = get_video_buffer,
                                     .start_frame      = start_frame,
                                     .end_frame        = end_frame },
                                   { .name = NULL}},
                                     .start_frame      = start_frame,
                                     .end_frame        = end_frame },
                                   { .name = NULL}},