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@gmx.at>
Signed-off-by: Clément Bœsch <ubitux@gmail.com>
... | ... |
@@ -807,7 +807,7 @@ static int opt_input_file(void *optctx, const char *opt, const char *filename) |
807 | 807 |
|
808 | 808 |
/* if seeking requested, we execute it */ |
809 | 809 |
if (o->start_time != 0) { |
810 |
- ret = av_seek_frame(ic, -1, timestamp, AVSEEK_FLAG_BACKWARD); |
|
810 |
+ ret = avformat_seek_file(ic, -1, INT64_MIN, timestamp, timestamp, 0); |
|
811 | 811 |
if (ret < 0) { |
812 | 812 |
av_log(NULL, AV_LOG_WARNING, "%s: could not seek to position %0.3f\n", |
813 | 813 |
filename, (double)timestamp / AV_TIME_BASE); |