Commit 6a598a0152 for ffmpeg

commit 6a598a0152c65f2385d0f483d5e30957efbee68a
Author: Michael Niedermayer <michael@niedermayer.cc>
Date:   Wed Nov 11 17:55:16 2026 +0100

    fftools/ffmpeg_filter: do not use a fallback frame that was not allocated

    Fixes: NULL pointer dereference
    Fixes: avif/gain_map_alpha_grid.avif without an AV1 software decoder
    Fixes: fsm1bknlI5TP

    Found-by: Onur Tirtir <onurcantirtir@gmail.com>

    The crash is mentioned in https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/25917
    This is not a security issue.

    NULL pointer dereference Replicated through UnModified FFmpeg

diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c
index 32ff664855..6b84617b5b 100644
--- a/fftools/ffmpeg_filter.c
+++ b/fftools/ffmpeg_filter.c
@@ -3181,7 +3181,7 @@ static int send_eof(FilterGraphThread *fgt, InputFilter *ifilter,
         if (ret < 0)
             return ret;
     } else {
-        if (ifp->format < 0) {
+        if (ifp->format < 0 && ifp->opts.fallback) {
             // the filtergraph was never configured, use the fallback parameters
             ifp->format                 = ifp->opts.fallback->format;
             ifp->sample_rate            = ifp->opts.fallback->sample_rate;