lavfi/movie: free packet on decoder error
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 25 Jun 2013 01:11:58 +0000 (03:11 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 25 Jun 2013 11:37:40 +0000 (13:37 +0200)
Prevents infinite loop, see Ticket2556

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavfilter/src_movie.c

index 058838a..a784f43 100644 (file)
@@ -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)