diff options
author | Nicolas George <nicolas.george@normalesup.org> | 2012-03-07 17:10:00 +0100 |
---|---|---|
committer | Nicolas George <nicolas.george@normalesup.org> | 2012-03-08 17:00:12 +0100 |
commit | b50767c31d703c40b77d6e8def324b289141d023 (patch) | |
tree | 8e54ecae87ae39b4665a8bc43f22cca30d61a0d4 /libavfilter/vf_pad.c | |
parent | 4ecfb91b85dfbf0d1d57557a914a535965fe02a3 (diff) | |
download | ffmpeg-b50767c31d703c40b77d6e8def324b289141d023.tar.gz |
vf_pad: keep a reference to the output buffer.
Once fixed, the end_frame function does exactly what
avfilter_default_end_frame does; therefore, end_frame
can be removed to let avfilter_default_end_frame work.
Fixes ticket #1038.
Diffstat (limited to 'libavfilter/vf_pad.c')
-rw-r--r-- | libavfilter/vf_pad.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/libavfilter/vf_pad.c b/libavfilter/vf_pad.c index e226a003d1..9b2d5cfff5 100644 --- a/libavfilter/vf_pad.c +++ b/libavfilter/vf_pad.c @@ -335,13 +335,7 @@ static void start_frame(AVFilterLink *inlink, AVFilterBufferRef *inpicref) outpicref->video->w = pad->w; outpicref->video->h = pad->h; - avfilter_start_frame(inlink->dst->outputs[0], outpicref); -} - -static void end_frame(AVFilterLink *link) -{ - avfilter_end_frame(link->dst->outputs[0]); - avfilter_unref_buffer(link->cur_buf); + avfilter_start_frame(inlink->dst->outputs[0], avfilter_ref_buffer(outpicref, ~0)); } static void draw_send_bar_slice(AVFilterLink *link, int y, int h, int slice_dir, int before_slice) @@ -417,8 +411,7 @@ AVFilter avfilter_vf_pad = { .config_props = config_input, .get_video_buffer = get_video_buffer, .start_frame = start_frame, - .draw_slice = draw_slice, - .end_frame = end_frame, }, + .draw_slice = draw_slice, }, { .name = NULL}}, .outputs = (const AVFilterPad[]) {{ .name = "default", |