aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2013-08-21 20:02:25 +0000
committerPaul B Mahol <onemda@gmail.com>2013-08-21 20:02:25 +0000
commite7834d29f2a8f572a5bdf173d56b5a9b5af16043 (patch)
treeaef78596035498d8ddfef9942c61b15f7bca46f5
parent71c378984b0bd5470f67c424a79a4750f84d2d3e (diff)
downloadffmpeg-e7834d29f2a8f572a5bdf173d56b5a9b5af16043.tar.gz
lavfi/separatefields: fix frame leak
Signed-off-by: Paul B Mahol <onemda@gmail.com>
-rw-r--r--libavfilter/vf_separatefields.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavfilter/vf_separatefields.c b/libavfilter/vf_separatefields.c
index d9c4839630..8fce6de060 100644
--- a/libavfilter/vf_separatefields.c
+++ b/libavfilter/vf_separatefields.c
@@ -77,8 +77,10 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *inpicref)
inpicref->pts = outlink->frame_count * sf->ts_unit;
ret = ff_filter_frame(outlink, inpicref);
- if (ret < 0)
+ if (ret < 0) {
+ av_frame_free(&second);
return ret;
+ }
second->pts = outlink->frame_count * sf->ts_unit;
return ff_filter_frame(outlink, second);