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

2017-03-11 Thread Michael Niedermayer
On Thu, Mar 09, 2017 at 08:44:21PM +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).

please add a fate test, one of our fate clients runs with valgrind
so leaks would be detected

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Opposition brings concord. Out of discord comes the fairest harmony.
-- Heraclitus


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


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

2017-03-09 Thread Alexis Ballier
---
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

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel