Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVittorio Gambaletta (VittGam) <ffmpeg-dev@vittgam.net>2016-01-19 02:57:38 +0300
committerMarton Balint <cus@passwd.hu>2016-01-20 01:15:23 +0300
commitcde4b99f476875f53aa1596e937691de952ab457 (patch)
tree397b5f2ac7d3bae6f6e31a87fe0469406b8fcbcb
parent307b8482181685e9a87a8d2f4ab9c7d180eaf3ad (diff)
ffplay: seek only when pressing the right mouse button on the video window
Seeking by clicking on the video window can be annoying, because the user might click on it accidentally while eg. trying to get focus on it, and ffplay seeks instead. This commit changes that behaviour to seek only when the right mouse button is used to click and drag on the window. Signed-off-by: Vittorio Gambaletta <ffmpeg-dev@vittgam.net> Signed-off-by: Marton Balint <cus@passwd.hu>
-rw-r--r--Changelog1
-rw-r--r--ffplay.c4
2 files changed, 4 insertions, 1 deletions
diff --git a/Changelog b/Changelog
index ed18cf1d99..d458991c62 100644
--- a/Changelog
+++ b/Changelog
@@ -54,6 +54,7 @@ version <next>:
- libstagefright support removed
- spectrumsynth filter
- ahistogram filter
+- only seek with the right mouse button in ffplay
version 2.8:
diff --git a/ffplay.c b/ffplay.c
index d2e3dc6fb1..2fa7165dee 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -3480,9 +3480,11 @@ static void event_loop(VideoState *cur_stream)
}
cursor_last_shown = av_gettime_relative();
if (event.type == SDL_MOUSEBUTTONDOWN) {
+ if (event.button.button != SDL_BUTTON_RIGHT)
+ break;
x = event.button.x;
} else {
- if (event.motion.state != SDL_PRESSED)
+ if (!(event.motion.state & SDL_BUTTON_RMASK))
break;
x = event.motion.x;
}