Signed-off-by: xiaofeng <wasp...@gmail.com>

--
From 8fd783a0a4e7803e202624ae04e0a38ba18124e3 Mon Sep 17 00:00:00 2001
From: xiaofeng <wasp...@gmail.com>
Date: Sun, 30 Sep 2018 20:16:22 +0800
Subject: [PATCH] ffmpeg: break loop when dts_heuristic check done

---
 fftools/ffmpeg_opt.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c
index c44ed63730..d4851a2cd8 100644
--- a/fftools/ffmpeg_opt.c
+++ b/fftools/ffmpeg_opt.c
@@ -1149,8 +1149,10 @@ static int open_input_file(OptionsContext *o, const char *filename)
             int dts_heuristic = 0;
             for (i=0; i<ic->nb_streams; i++) {
                 const AVCodecParameters *par = ic->streams[i]->codecpar;
-                if (par->video_delay)
+                if (par->video_delay) {
                     dts_heuristic = 1;
+                    break;
+                }
             }
             if (dts_heuristic) {
                 seek_timestamp -= 3*AV_TIME_BASE / 23;
-- 
2.16.4

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to