diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-10-22 17:08:00 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-10-22 22:26:32 +0200 |
commit | 9bdb7a6c1a8bcc36cf276107fb2e6fca12687d40 (patch) | |
tree | a45010eb538a1f57d9291b201cad4a633c517d40 /ffmpeg.c | |
parent | ec6a5fc6cca22e4eb0a91cc8fba786d41ade2032 (diff) | |
download | ffmpeg-streaming-9bdb7a6c1a8bcc36cf276107fb2e6fca12687d40.zip ffmpeg-streaming-9bdb7a6c1a8bcc36cf276107fb2e6fca12687d40.tar.gz |
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>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r-- | ffmpeg.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |