[MPlayer-dev-eng] [PATCH] move check_events to after pageflip

kirin_e at users.sourceforge.net kirin_e at users.sourceforge.net
Wed Nov 23 13:33:06 CET 2011


Hi,

when resizing the output window the event is handled by the vo after drawing but before flipping. This means the vo has to redraw/resize the already drawn frame or end up showing an incorrect frame. Attached is a simple patch to mplayer.c that moves check_events to right after the pageflip, so the vo can start drawing the correct size right away instead.

/kirin
-------------- next part --------------
--- mplayer.c   2011-10-25 22:45:09.000000000 +0200
+++ ../../mplayer-export-2011-10-31/mplayer.c   2011-11-06 02:05:18.000000000 +0100
@@ -3757,11 +3757,6 @@ goto_enable_cache:
                 if (use_gui)
                     gui(GUI_HANDLE_EVENTS, 0);
 #endif
-
-                current_module = "vo_check_events";
-                if (vo_config_count)
-                    mpctx->video_out->check_events();
-
 #ifdef CONFIG_X11
                 if (stop_xscreensaver) {
                     current_module = "stop_xscreensaver";
@@ -3794,6 +3789,11 @@ goto_enable_cache:
                         vout_time_usage += (GetTimer() - t2) * 0.000001;
                     }
                 }
+
+                current_module = "vo_check_events";
+                if (vo_config_count)
+                    mpctx->video_out->check_events();
+
 //====================== A-V TIMESTAMP CORRECTION: =========================

                 adjust_sync_and_print_status(frame_time_remaining, mpctx->time_frame);


More information about the MPlayer-dev-eng mailing list