From 015cc3239a20850a6de573afd1b9820107144942 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 25 Jun 2013 03:11:58 +0200 Subject: [PATCH] lavfi/movie: free packet on decoder error Prevents infinite loop, see Ticket2556 Signed-off-by: Michael Niedermayer --- libavfilter/src_movie.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavfilter/src_movie.c b/libavfilter/src_movie.c index 058838aeac..a784f43b2b 100644 --- a/libavfilter/src_movie.c +++ b/libavfilter/src_movie.c @@ -514,6 +514,9 @@ static int movie_push_frame(AVFilterContext *ctx, unsigned out_id) if (ret < 0) { av_log(ctx, AV_LOG_WARNING, "Decode error: %s\n", av_err2str(ret)); av_frame_free(&movie->frame); + av_free_packet(&movie->pkt0); + movie->pkt0.size = 0; + movie->pkt0.data = NULL; return 0; } if (!ret)