[FFmpeg-cvslog] lavfi/separatefields: fix frame leak

Paul B Mahol git at videolan.org
Wed Aug 21 22:05:23 CEST 2013


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Wed Aug 21 20:02:25 2013 +0000| [e7834d29f2a8f572a5bdf173d56b5a9b5af16043] | committer: Paul B Mahol

lavfi/separatefields: fix frame leak

Signed-off-by: Paul B Mahol <onemda at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e7834d29f2a8f572a5bdf173d56b5a9b5af16043
---

 libavfilter/vf_separatefields.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavfilter/vf_separatefields.c b/libavfilter/vf_separatefields.c
index d9c4839..8fce6de 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);



More information about the ffmpeg-cvslog mailing list