[FFmpeg-cvslog] ffmpeg: use avformat_seek_file() instead of av_seek_frame().

Clément Bœsch git at videolan.org
Sun Dec 2 00:19:21 CET 2012


ffmpeg | branch: master | Clément Bœsch <ubitux at gmail.com> | Fri Nov 23 21:11:49 2012 +0100| [b684f744ac1e4c5cbd6ac91d2be6098e1b122288] | committer: Clément Bœsch

ffmpeg: use avformat_seek_file() instead of av_seek_frame().

avformat_seek_file() is the new API. It will make sure the read_seek2()
callback is called when the demuxer has it.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
Signed-off-by: Clément Bœsch <ubitux at gmail.com>

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

 ffmpeg_opt.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c
index df85230..c846a10 100644
--- a/ffmpeg_opt.c
+++ b/ffmpeg_opt.c
@@ -807,7 +807,7 @@ static int opt_input_file(void *optctx, const char *opt, const char *filename)
 
     /* if seeking requested, we execute it */
     if (o->start_time != 0) {
-        ret = av_seek_frame(ic, -1, timestamp, AVSEEK_FLAG_BACKWARD);
+        ret = avformat_seek_file(ic, -1, INT64_MIN, timestamp, timestamp, 0);
         if (ret < 0) {
             av_log(NULL, AV_LOG_WARNING, "%s: could not seek to position %0.3f\n",
                    filename, (double)timestamp / AV_TIME_BASE);



More information about the ffmpeg-cvslog mailing list