You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
ffmpeg: avoid endlessly reading from one input while another is unavailable
Testcase in Ticket 4051 Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
4
ffmpeg.c
4
ffmpeg.c
@@ -3090,9 +3090,9 @@ static OutputStream *choose_output(void)
|
|||||||
OutputStream *ost = output_streams[i];
|
OutputStream *ost = output_streams[i];
|
||||||
int64_t opts = av_rescale_q(ost->st->cur_dts, ost->st->time_base,
|
int64_t opts = av_rescale_q(ost->st->cur_dts, ost->st->time_base,
|
||||||
AV_TIME_BASE_Q);
|
AV_TIME_BASE_Q);
|
||||||
if (!ost->unavailable && !ost->finished && opts < opts_min) {
|
if (!ost->finished && opts < opts_min) {
|
||||||
opts_min = opts;
|
opts_min = opts;
|
||||||
ost_min = ost;
|
ost_min = ost->unavailable ? NULL : ost;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ost_min;
|
return ost_min;
|
||||||
|
Reference in New Issue
Block a user