[FFmpeg-cvslog] ffplay: properly detect all window size changes
Marton Balint
git at videolan.org
Wed Aug 14 23:22:59 EEST 2019
ffmpeg | branch: release/4.2 | Marton Balint <cus at passwd.hu> | Tue Aug 13 23:05:44 2019 +0200| [c8dcda22f170a3024c34517a766ff07aa0edaa09] | committer: Marton Balint
ffplay: properly detect all window size changes
SDL_WINDOWEVENT_SIZE_CHANGED should be used instead of SDL_WINDOWEVENT_RESIZED
because SDL_WINDOWEVENT_RESIZED is only emitted if the resize happened due to
an external event.
Fixes ticket #8072.
Additional references:
https://bugzilla.libsdl.org/show_bug.cgi?id=4760
https://wiki.libsdl.org/SDL_WindowEventID
Signed-off-by: Marton Balint <cus at passwd.hu>
(cherry picked from commit a1c70148471c528104d64dffbc7af70e5d1ce33e)
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c8dcda22f170a3024c34517a766ff07aa0edaa09
---
fftools/ffplay.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fftools/ffplay.c b/fftools/ffplay.c
index 8fb8faeb06..fee0619f7c 100644
--- a/fftools/ffplay.c
+++ b/fftools/ffplay.c
@@ -3436,7 +3436,7 @@ static void event_loop(VideoState *cur_stream)
break;
case SDL_WINDOWEVENT:
switch (event.window.event) {
- case SDL_WINDOWEVENT_RESIZED:
+ case SDL_WINDOWEVENT_SIZE_CHANGED:
screen_width = cur_stream->width = event.window.data1;
screen_height = cur_stream->height = event.window.data2;
if (cur_stream->vis_texture) {
More information about the ffmpeg-cvslog
mailing list