diff options
author | Anton Khirnov <anton@khirnov.net> | 2012-07-08 04:07:05 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2012-07-20 21:06:49 +0200 |
commit | 0fe010a36f6604ea8fd9be04c895395d215177dd (patch) | |
tree | 0ebc646e1b191450fde103e63a61471ec5cb7f5f /libavfilter | |
parent | 51a8049be8be096b50a1613d65433f9c7949e1a2 (diff) | |
download | ffmpeg-0fe010a36f6604ea8fd9be04c895395d215177dd.tar.gz |
vf_delogo: don't store two pointers to one AVFilterBufferRef.
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/vf_delogo.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libavfilter/vf_delogo.c b/libavfilter/vf_delogo.c index c2487396d7..2f9e1f9cac 100644 --- a/libavfilter/vf_delogo.c +++ b/libavfilter/vf_delogo.c @@ -226,7 +226,7 @@ static void start_frame(AVFilterLink *inlink, AVFilterBufferRef *inpicref) outpicref->video->w = outlink->w; outpicref->video->h = outlink->h; } else - outpicref = inpicref; + outpicref = avfilter_ref_buffer(inpicref, ~0); outlink->out_buf = outpicref; ff_start_frame(outlink, avfilter_ref_buffer(outpicref, ~0)); @@ -240,7 +240,7 @@ static void end_frame(AVFilterLink *inlink) AVFilterLink *outlink = inlink->dst->outputs[0]; AVFilterBufferRef *inpicref = inlink ->cur_buf; AVFilterBufferRef *outpicref = outlink->out_buf; - int direct = inpicref == outpicref; + int direct = inpicref->buf == outpicref->buf; int hsub0 = av_pix_fmt_descriptors[inlink->format].log2_chroma_w; int vsub0 = av_pix_fmt_descriptors[inlink->format].log2_chroma_h; int plane; @@ -261,8 +261,7 @@ static void end_frame(AVFilterLink *inlink) ff_draw_slice(outlink, 0, inlink->h, 1); ff_end_frame(outlink); avfilter_unref_buffer(inpicref); - if (!direct) - avfilter_unref_buffer(outpicref); + avfilter_unref_buffer(outpicref); } AVFilter avfilter_vf_delogo = { |