lavfi/movie: free packet on decoder error
[ffmpeg.git] / libavfilter / src_movie.c
index 058838aeaca55f2dcdd1405e324103b1646f98c3..a784f43b2bb5b58d030940478c5f6095cdc49a30 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)