Commit e7834d29 authored by Paul B Mahol's avatar Paul B Mahol

lavfi/separatefields: fix frame leak

Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent 71c37898
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment