Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
Matthieu Bouron authored on 2012/12/09 00:50:44... | ... |
@@ -24,6 +24,7 @@ |
24 | 24 |
*/ |
25 | 25 |
|
26 | 26 |
#include "avfilter.h" |
27 |
+#include "internal.h" |
|
27 | 28 |
#include "video.h" |
28 | 29 |
|
29 | 30 |
enum SetFieldMode { |
... | ... |
@@ -69,18 +70,17 @@ static av_cold int init(AVFilterContext *ctx, const char *args) |
69 | 69 |
return 0; |
70 | 70 |
} |
71 | 71 |
|
72 |
-static int start_frame(AVFilterLink *inlink, AVFilterBufferRef *inpicref) |
|
72 |
+static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *picref) |
|
73 | 73 |
{ |
74 | 74 |
SetFieldContext *setfield = inlink->dst->priv; |
75 |
- AVFilterBufferRef *outpicref = avfilter_ref_buffer(inpicref, ~0); |
|
76 | 75 |
|
77 | 76 |
if (setfield->mode == MODE_PROG) { |
78 |
- outpicref->video->interlaced = 0; |
|
77 |
+ picref->video->interlaced = 0; |
|
79 | 78 |
} else if (setfield->mode != MODE_AUTO) { |
80 |
- outpicref->video->interlaced = 1; |
|
81 |
- outpicref->video->top_field_first = setfield->mode; |
|
79 |
+ picref->video->interlaced = 1; |
|
80 |
+ picref->video->top_field_first = setfield->mode; |
|
82 | 81 |
} |
83 |
- return ff_start_frame(inlink->dst->outputs[0], outpicref); |
|
82 |
+ return ff_filter_frame(inlink->dst->outputs[0], picref); |
|
84 | 83 |
} |
85 | 84 |
|
86 | 85 |
static const AVFilterPad setfield_inputs[] = { |
... | ... |
@@ -88,7 +88,7 @@ static const AVFilterPad setfield_inputs[] = { |
88 | 88 |
.name = "default", |
89 | 89 |
.type = AVMEDIA_TYPE_VIDEO, |
90 | 90 |
.get_video_buffer = ff_null_get_video_buffer, |
91 |
- .start_frame = start_frame, |
|
91 |
+ .filter_frame = filter_frame, |
|
92 | 92 |
}, |
93 | 93 |
{ NULL } |
94 | 94 |
}; |