[FFmpeg-cvslog] ffmpeg: avoid endlessly reading from one input while another is unavailable

Michael Niedermayer git at videolan.org
Wed Oct 22 22:30:57 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Oct 22 17:08:00 2014 +0200| [9bdb7a6c1a8bcc36cf276107fb2e6fca12687d40] | committer: Michael Niedermayer

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

Testcase in Ticket 4051

Reviewed-by: Nicolas George <george at nsup.org>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9bdb7a6c1a8bcc36cf276107fb2e6fca12687d40
---

 ffmpeg.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index 051feae..e6ba0f6 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -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;



More information about the ffmpeg-cvslog mailing list