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;
}
void VideoWidget::mousePressEvent(QMouseEvent *e)
{
- if (e->button() == Qt::LeftButton) {
+ if (e->button() == Qt::BackButton) {
+ emit mouse_back_clicked();
+ } else if (e->button() == Qt::ForwardButton) {
+ emit mouse_forward_clicked();
+ } else if (e->button() == Qt::LeftButton) {
dragging = true;
last_drag_x = e->position().x();
last_drag_y = e->position().y();