[FFmpeg-cvslog] avfilter/framesync: fix OOM case

Paul B Mahol git at videolan.org
Thu Nov 30 12:01:07 EET 2023


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Mon Nov 27 13:04:16 2023 +0100| [a30adf9f96254f4870066c98a6dbf13fc74515a3] | committer: Paul B Mahol

avfilter/framesync: fix OOM case

Fixes OOM when caller keeps adding frames into filtergraph
that reached EOF by other means, for example EOF is signalled
by other filter in filtergraph or by buffersink.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a30adf9f96254f4870066c98a6dbf13fc74515a3
---

 libavfilter/framesync.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavfilter/framesync.c b/libavfilter/framesync.c
index 6cb4b21fed..23681b5183 100644
--- a/libavfilter/framesync.c
+++ b/libavfilter/framesync.c
@@ -354,8 +354,11 @@ static int consume_from_fifos(FFFrameSync *fs)
 
 int ff_framesync_activate(FFFrameSync *fs)
 {
+    AVFilterContext *ctx = fs->parent;
     int ret;
 
+    FF_FILTER_FORWARD_STATUS_BACK_ALL(ctx->outputs[0], ctx);
+
     ret = framesync_advance(fs);
     if (ret < 0)
         return ret;



More information about the ffmpeg-cvslog mailing list