Commit 9bdb7a6c authored by Michael Niedermayer's avatar Michael Niedermayer

ffmpeg: avoid endlessly reading from one input while another is unavailable

Testcase in Ticket 4051
Reviewed-by: 's avatarNicolas George <george@nsup.org>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent ec6a5fc6
......@@ -3090,9 +3090,9 @@ static OutputStream *choose_output(void)
OutputStream *ost = output_streams[i];
int64_t opts = av_rescale_q(ost->st->cur_dts, ost->st->time_base,
AV_TIME_BASE_Q);
if (!ost->unavailable && !ost->finished && opts < opts_min) {
if (!ost->finished && opts < opts_min) {
opts_min = opts;
ost_min = ost;
ost_min = ost->unavailable ? NULL : ost;
}
}
return ost_min;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment