[FFmpeg-devel] [PATCH 1/2] lavf/vf_framerate: Fix frame leak when increasing framerate.

Alexis Ballier aballier at gentoo.org
Sat Mar 11 21:18:54 EET 2017


---
Can be reproduced with: ffmpeg -f lavfi -i cellauto,framerate=fps=100 -t 1 -f null -
(and your favorite memory debugger).
---
 libavfilter/vf_framerate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/vf_framerate.c b/libavfilter/vf_framerate.c
index 237a4873b3..b4a74f7f7d 100644
--- a/libavfilter/vf_framerate.c
+++ b/libavfilter/vf_framerate.c
@@ -526,7 +526,7 @@ static av_cold void uninit(AVFilterContext *ctx)
     FrameRateContext *s = ctx->priv;
     int i;
 
-    for (i = s->frst + 1; i < s->last; i++) {
+    for (i = s->frst; i < s->last; i++) {
         if (s->srce[i] && (s->srce[i] != s->srce[i + 1]))
             av_frame_free(&s->srce[i]);
     }
-- 
2.12.0



More information about the ffmpeg-devel mailing list