]> git.sesse.net Git - ffmpeg/commitdiff
ffmpeg: break loop when dts_heuristic check done
authorxiaofeng <wasphin@gmail.com>
Sun, 30 Sep 2018 12:16:22 +0000 (20:16 +0800)
committerMichael Niedermayer <michael@niedermayer.cc>
Sun, 30 Sep 2018 20:23:02 +0000 (22:23 +0200)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
fftools/ffmpeg_opt.c

index c44ed637302b54ff476414a11685d50ed7e2f112..d4851a2cd8c96cf036607017241dfa18f103c34f 100644 (file)
@@ -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;