[FFmpeg-cvslog] ffmpeg: return no chosen output if an uninitialized stream is unavailable
Jan Ekström
git at videolan.org
Thu May 13 18:09:11 EEST 2021
ffmpeg | branch: master | Jan Ekström <jeebjp at gmail.com> | Thu May 6 23:31:44 2021 +0300| [ec20b8130269260f3ae1e4642da26ba556814f84] | committer: Jan Ekström
ffmpeg: return no chosen output if an uninitialized stream is unavailable
Otherwise the rate emulation logic in `transcode_step` never gets
hit, and the unavailability flag never gets reset, leading to an
eternal loop with some rate emulation use cases.
This change was missed during the rework of ffmpeg.c, in which
encoder initialization was moved further down the time line in
commit 67be1ce0c6de330b1c10d1d121819d8a74a7b1f5 . Previously,
as the encoder initialization had happened earlier, this state was
not possible (flow getting as far as hitting the rate emulation logic,
yet not having the encoder initialized yet).
Fixes #9160
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ec20b8130269260f3ae1e4642da26ba556814f84
---
fftools/ffmpeg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index 3ad11452da..b3658d8f65 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -3958,7 +3958,7 @@ static OutputStream *choose_output(void)
ost->st->index, ost->st->id, ost->initialized, ost->inputs_done, ost->finished);
if (!ost->initialized && !ost->inputs_done)
- return ost;
+ return ost->unavailable ? NULL : ost;
if (!ost->finished && opts < opts_min) {
opts_min = opts;
More information about the ffmpeg-cvslog
mailing list