diff mbox

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

Message ID 20170311191855.22983-1-aballier@gentoo.org
State Accepted
Headers show

Commit Message

Alexis Ballier March 11, 2017, 7:18 p.m. UTC
---
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(-)

Comments

Michael Niedermayer March 16, 2017, 3:14 p.m. UTC | #1
On Sat, Mar 11, 2017 at 08:18:54PM +0100, Alexis Ballier wrote:
> ---
> 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(-)

patchset applied

thx

[...]
diff mbox

Patch

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]);
     }