diff options
author | Anton Khirnov <anton@khirnov.net> | 2012-07-14 17:09:43 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2012-07-20 21:12:49 +0200 |
commit | 4c9080a7ef18ad71fb0a75c8d1c1803edd780edd (patch) | |
tree | c1301bfaeaecbdc002a236dddee476d24da90df2 /libavfilter/video.c | |
parent | 07bad27810cdd7d3171cbd542119aa051646377c (diff) | |
download | ffmpeg-4c9080a7ef18ad71fb0a75c8d1c1803edd780edd.tar.gz |
lavfi: unref AVFilterLink.out_buf in ff_end_frame().
This reduces code duplication and prevents stale pointers from remaining
on the link.
Diffstat (limited to 'libavfilter/video.c')
-rw-r--r-- | libavfilter/video.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/libavfilter/video.c b/libavfilter/video.c index e507f973b4..f61eafe19e 100644 --- a/libavfilter/video.c +++ b/libavfilter/video.c @@ -225,10 +225,6 @@ static void default_end_frame(AVFilterLink *inlink) outlink = inlink->dst->outputs[0]; if (outlink) { - if (outlink->out_buf) { - avfilter_unref_buffer(outlink->out_buf); - outlink->out_buf = NULL; - } ff_end_frame(outlink); } } @@ -249,6 +245,7 @@ void ff_end_frame(AVFilterLink *link) link->src_buf = NULL; } avfilter_unref_bufferp(&link->cur_buf); + avfilter_unref_bufferp(&link->out_buf); } void ff_null_draw_slice(AVFilterLink *link, int y, int h, int slice_dir) |