X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=video_widget.cpp;h=0a7ff43eb7b2f4f77637e2553b9717e73e3653da;hb=280e1391ec1d4ea4e498377726d7613874335943;hp=f8db9002b7ba91d2d32cf3ecdd0fcdeaea09e702;hpb=6f24464b7ed7f1bdf3aeb7840a53ecdee7f5c819;p=pkanalytics diff --git a/video_widget.cpp b/video_widget.cpp index f8db900..0a7ff43 100644 --- a/video_widget.cpp +++ b/video_widget.cpp @@ -139,7 +139,7 @@ bool VideoWidget::process_queued_commands(AVFormatContext *format_ctx, AVCodecCo relative_seek_ms += cmd.relative_seek_ms; relative_seek_frames += cmd.relative_seek_frames; } else if (cmd.command == QueuedCommand::SEEK_ABSOLUTE) { - base_pts = cmd.seek_ms; + base_pts = av_rescale_q(cmd.seek_ms, AVRational{ 1, 1000 }, video_timebase); relative_seek_ms = 0; relative_seek_frames = 0; }