diff options
author | Nicolas George <nicolas.george@normalesup.org> | 2012-07-22 19:56:59 +0400 |
---|---|---|
committer | Nicolas George <nicolas.george@normalesup.org> | 2012-07-22 20:35:28 +0400 |
commit | 9c1d649ce57c2b707b5a2eab47f05dd1833bda22 (patch) | |
tree | 6da7594a50b58c473e2ace68394a4bb41f17a5dd /libavfilter/vf_overlay.c | |
parent | 1be55c82a5b0ec4c16ab3aba5667ca47f9f169ff (diff) |
overlay: clear cur_buf on main input link.
A reference is kept in the queue and freed after use.
Diffstat (limited to 'libavfilter/vf_overlay.c')
-rw-r--r-- | libavfilter/vf_overlay.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavfilter/vf_overlay.c b/libavfilter/vf_overlay.c index 680e074019..9f8163d2bf 100644 --- a/libavfilter/vf_overlay.c +++ b/libavfilter/vf_overlay.c @@ -514,8 +514,11 @@ static void start_frame_main(AVFilterLink *inlink, AVFilterBufferRef *inpicref) flush_frames(ctx); inpicref->pts = av_rescale_q(inpicref->pts, ctx->inputs[MAIN]->time_base, ctx->outputs[0]->time_base); - if (try_start_frame(ctx, inpicref) < 0) + if (try_start_frame(ctx, inpicref) < 0) { ff_bufqueue_add(ctx, &over->queue_main, inpicref); + av_assert1(inpicref == inlink->cur_buf); + inlink->cur_buf = NULL; + } } static void draw_slice_main(AVFilterLink *inlink, int y, int h, int slice_dir) |