mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-26 09:12:33 +00:00
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 67be1ce0c6
. 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
This commit is contained in:
parent
c122a6c10d
commit
ec20b81302
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user