We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 56a0708 commit 3dc4306Copy full SHA for 3dc4306
src/video_capture/file.c
@@ -522,10 +522,9 @@ static void seek_start(struct vidcap_state_lavf_decoder *s) {
522
}
523
AVStream *st = s->fmt_ctx->streams[s->video_stream_idx];
524
AVRational tb = st->time_base;
525
+ int64_t ts = st->start_time + (int64_t) s->seek_sec * tb.den / tb.num;
526
CHECK_FF(avformat_seek_file(s->fmt_ctx, s->video_stream_idx, INT64_MIN,
- st->start_time + s->last_vid_pts +
527
- s->seek_sec * tb.den / tb.num,
528
- INT64_MAX, AVSEEK_FLAG_FRAME),
+ ts, INT64_MAX, AVSEEK_FLAG_FRAME),
529
{});
530
531
0 commit comments