[FFmpeg-devel] [PATCH] ffmpeg: return no chosen output if an uninitialized stream is unavailable
    Jan Ekström 
    jeebjp at gmail.com
       
    Fri May  7 00:25:21 EEST 2021
    
    
  
On Fri, May 7, 2021 at 12:22 AM Jan Ekström <jeebjp at gmail.com> wrote:
>
> Otherwise the rate emulation logic in `transcode_step` never gets
> hit, and the unavailability flag never gets reset, leading to an
> eternal loop.
>
> Fixes #9160
Sent this out as one way of dealing with this and to receive comments.
Alternatively the logic in transcode_step could be modified to be:
diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index b3658d8f65..4d93bf0e9b 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -4684,7 +4684,7 @@ static int transcode_step(void)
     int ret;
     ost = choose_output();
-    if (!ost) {
+    if (!ost || ost->unavailable) {
         if (got_eagain()) {
             reset_eagain();
             av_usleep(10000);
Which I would expect to have a similar effect (have not tested yet).
Jan
    
    
More information about the ffmpeg-devel
mailing list