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

avfilter/vf_detelecine: fix obvious frame memory leaks

parent 1dcb5b7d
...@@ -206,6 +206,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *inpicref) ...@@ -206,6 +206,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *inpicref)
if (s->nskip_fields >= 2) { if (s->nskip_fields >= 2) {
s->nskip_fields -= 2; s->nskip_fields -= 2;
av_frame_free(&inpicref);
return 0; return 0;
} else if (s->nskip_fields >= 1) { } else if (s->nskip_fields >= 1) {
for (i = 0; i < s->nb_planes; i++) { for (i = 0; i < s->nb_planes; i++) {
...@@ -216,6 +217,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *inpicref) ...@@ -216,6 +217,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *inpicref)
} }
s->occupied = 1; s->occupied = 1;
s->nskip_fields--; s->nskip_fields--;
av_frame_free(&inpicref);
return 0; return 0;
} }
......
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