[FFmpeg-trac] #10932(undetermined:new): Regression with filter graph involving -shortest flag

FFmpeg trac at avcodec.org
Wed May 8 17:42:03 EEST 2024


#10932: Regression with filter graph involving -shortest flag
-------------------------------------+-------------------------------------
             Reporter:  Wes Castro   |                    Owner:  (none)
                 Type:  defect       |                   Status:  new
             Priority:  important    |                Component:
                                     |  undetermined
              Version:  git-master   |               Resolution:
             Keywords:  shortest     |               Blocked By:
  aloop hang regression              |
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
Comment (by Michael Niedermayer):

 Heres the history of commits changing the behavior of this testcase.
 Bisecting this was some work given how many times the behavior changed


 master f5d2dc7b4bd2430c7a3d977b22bd20ef3508505c: only audio

     ce178be8b0caf3255ceeeff14a8c3619dac5cc8a is the first bad commit
     commit ce178be8b0caf3255ceeeff14a8c3619dac5cc8a
     Author: Anton Khirnov <anton at khirnov.net>
     Date:   Thu Mar 7 15:21:30 2024 +0100

         fftools/ffmpeg_filter: do not assume
 av_buffersrc_get_nb_failed_requests()>0

         Apparently it can happen that avfilter_graph_request_oldest()
 returns
         EAGAIN, yet av_buffersrc_get_nb_failed_requests() returns 0 for
 every
         input.

         Works around #10795, though the root issue is most likely in the
         scale2ref filter.

     fftools/ffmpeg_filter.c | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)

 Assertion best_input >= 0 failed at fftools/ffmpeg_filter.c:1922

     commit 66e78e9680db2a0daecf4d79637dcbf872450f08
     Author: Anton Khirnov <anton at khirnov.net>
     Date:   Wed Jul 19 19:29:18 2023 +0200

         fftools/ffmpeg_demux: switch from AVThreadMessageQueue to
 ThreadQueue

         * the code is made shorter and simpler
         * avoids constantly allocating and freeing AVPackets, thanks to
         ThreadQueue integration with ObjPool
         * is consistent with decoding/filtering/muxing
         * reduces the diff in the future switch to thread-aware scheduling

         This makes ifile_get_packet() always block. Any potential issues
 caused
         by this will be resolved by the switch to thread-aware scheduling
 in
         future commits.

     fftools/ffmpeg.c        |  32 +++++++--------
     fftools/ffmpeg.h        |   3 +-
     fftools/ffmpeg_demux.c  | 106
 +++++++++++++++++-------------------------------
     fftools/ffmpeg_filter.c |   5 ++-
     4 files changed, 57 insertions(+), 89 deletions(-)

 Infinite loop

     d9e41ead82263e96ebd14d4d88d6e7f858dd944c is the first bad commit
     commit d9e41ead82263e96ebd14d4d88d6e7f858dd944c
     Author: Paul B Mahol <onemda at gmail.com>
     Date:   Fri Dec 1 16:59:07 2023 +0100

         avfilter/avfilter: fix OOM case for default activate

         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.

 fail no space left on device (loop 99 supposedly workarounds)

     dde3de017088ab5bf7fb7920d3d8d4ba4e5dc290 is the first bad commit
     commit dde3de017088ab5bf7fb7920d3d8d4ba4e5dc290
     Author: Anton Khirnov <anton at khirnov.net>
     Date:   Thu Jul 13 13:34:32 2023 +0200

         fftools/ffmpeg_enc: return errors from do_*_out() instead of
 aborting

     fftools/ffmpeg_enc.c | 29 ++++++++++++++---------------
     1 file changed, 14 insertions(+), 15 deletions(-)

 conversion failed

     commit 923c6ab170669793d3311cbfd465a967d44f1636
     Author: Anton Khirnov <anton at khirnov.net>
     Date:   Fri Mar 24 08:59:05 2023 +0100

         fftools/ffmpeg: use sync queues for enforcing audio frame size

         The code currently uses lavfi for this, which creates a sort of
         configuration dependency loop - the encoder should be ideally
         initialized with information from the first audio frame, but to
 get this
         frame one needs to first open the encoder to know the frame size.
 This
         necessitates an awkward workaround, which causes audio handling to
 be
         different from video.

         With this change, audio encoder initialization is congruent with
 video.

     fftools/ffmpeg.c          | 58
 ++++++++++-------------------------------------
     fftools/ffmpeg_filter.c   |  8 -------
     fftools/ffmpeg_mux_init.c | 19 +++++++++++-----
     3 files changed, 25 insertions(+), 60 deletions(-)

 448 infinite

     b2b9e9ccee0647b4695edaa66ae824850260ee02 is the first bad commit
     commit b2b9e9ccee0647b4695edaa66ae824850260ee02
     Author: Anton Khirnov <anton at khirnov.net>
     Date:   Fri Jun 10 14:38:32 2022 +0200

         fftools/ffmpeg: use last filter output pts to choose next output
 stream

         This will be needed in following commits that will add new
 buffering
         stages after encoding and bitstream filtering.

     fftools/ffmpeg.c     | 22 +++++++++++++++++-----
     fftools/ffmpeg.h     |  2 ++
     fftools/ffmpeg_opt.c |  1 +
     3 files changed, 20 insertions(+), 5 deletions(-)


 5.1: working
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/10932#comment:2>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list