Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Ekström <jeebjp@gmail.com>2021-05-06 23:31:44 +0300
committerJan Ekström <jeebjp@gmail.com>2021-05-13 18:12:02 +0300
commit70405dd7e31cd436e9ffa252124537df253a5dc3 (patch)
tree753d0b222473b799163f92969f2f84658020c54e /fftools
parent74bcfe5f858a720695736268c861fb34160941e9 (diff)
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 (cherry picked from commit ec20b8130269260f3ae1e4642da26ba556814f84)
Diffstat (limited to 'fftools')
-rw-r--r--fftools/ffmpeg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index 46bb014de8..7d533c3806 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -3950,7 +3950,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;