]> git.sesse.net Git - ffmpeg/commitdiff
ffmpeg: switch to avformat_seek_file for stream_loop
authorGyan Doshi <ffmpeg@gyani.pro>
Sat, 31 Aug 2019 14:15:58 +0000 (19:45 +0530)
committerGyan Doshi <ffmpeg@gyani.pro>
Thu, 5 Sep 2019 17:53:11 +0000 (23:23 +0530)
Fixes stream_loop with very short files where seeking is generic index
search

fftools/ffmpeg.c

index 01f04103cfac1854b843e904c674497390c54b99..b6ecb89893d8ad0f0b48735988305b80bcb6432f 100644 (file)
@@ -4195,7 +4195,7 @@ static int seek_to_start(InputFile *ifile, AVFormatContext *is)
     int i, ret, has_audio = 0;
     int64_t duration = 0;
 
-    ret = av_seek_frame(is, -1, is->start_time, 0);
+    ret = avformat_seek_file(is, -1, INT64_MIN, is->start_time, is->start_time, 0);
     if (ret < 0)
         return ret;