[vlc-commits] vout:win32: remove write-only event->source

Steve Lhomme git at videolan.org
Mon Apr 1 16:50:12 CEST 2019


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Mar 25 13:25:36 2019 +0100| [288e7876243e9e96d3b7596bc9fc5ac4a92408fe] | committer: Steve Lhomme

vout:win32: remove write-only event->source

The vd->source is used to create the window and never after.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=288e7876243e9e96d3b7596bc9fc5ac4a92408fe
---

 modules/video_output/win32/common.c | 2 +-
 modules/video_output/win32/events.c | 6 +-----
 modules/video_output/win32/events.h | 3 +--
 3 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/modules/video_output/win32/common.c b/modules/video_output/win32/common.c
index 411b51258f..845bcb6b14 100644
--- a/modules/video_output/win32/common.c
+++ b/modules/video_output/win32/common.c
@@ -208,7 +208,7 @@ void UpdateRects(vout_display_t *vd, vout_display_sys_win32_t *sys, bool is_forc
 #if !VLC_WINSTORE_APP
     if (!sys->b_windowless)
     {
-        EventThreadUpdateSourceAndPlace(sys->event, source, &sys->place);
+        EventThreadUpdatePlace(sys->event, &sys->place);
 
         UINT swpFlags = SWP_NOCOPYBITS | SWP_NOZORDER | SWP_ASYNCWINDOWPOS;
         if (sys->is_first_placement)
diff --git a/modules/video_output/win32/events.c b/modules/video_output/win32/events.c
index 8fb0af9185..aa97111061 100644
--- a/modules/video_output/win32/events.c
+++ b/modules/video_output/win32/events.c
@@ -87,7 +87,6 @@ struct event_thread_t
     HWND hwnd;
     HWND hvideownd;
     HWND hfswnd;
-    video_format_t       source;
     vout_display_place_t place;
 
     HICON vlc_icon;
@@ -408,12 +407,10 @@ int EventThreadGetWindowStyle( event_thread_t *p_event )
     return p_event->i_window_style;
 }
 
-void EventThreadUpdateSourceAndPlace( event_thread_t *p_event,
-                                      const video_format_t *p_source,
+void EventThreadUpdatePlace( event_thread_t *p_event,
                                       const vout_display_place_t *p_place )
 {
     vlc_mutex_lock( &p_event->lock );
-    p_event->source = *p_source;
     p_event->place  = *p_place;
     vlc_mutex_unlock( &p_event->lock );
 }
@@ -449,7 +446,6 @@ event_thread_t *EventThreadCreate( vout_display_t *vd, const vout_display_cfg_t
     p_event->is_cursor_hidden = false;
     p_event->button_pressed = 0;
     p_event->psz_title = NULL;
-    p_event->source = vd->source;
     p_event->hwnd = NULL;
     atomic_init(&p_event->has_moved, false);
     vout_display_PlacePicture(&p_event->place, &vd->source, vdcfg);
diff --git a/modules/video_output/win32/events.h b/modules/video_output/win32/events.h
index 1570c283fa..8797f673fd 100644
--- a/modules/video_output/win32/events.h
+++ b/modules/video_output/win32/events.h
@@ -52,8 +52,7 @@ void            EventThreadStop( event_thread_t * );
 
 void            EventThreadUpdateTitle( event_thread_t *, const char *psz_fallback );
 int             EventThreadGetWindowStyle( event_thread_t * );
-void            EventThreadUpdateSourceAndPlace( event_thread_t *p_event,
-                                                 const video_format_t *p_source,
+void            EventThreadUpdatePlace( event_thread_t *p_event,
                                                  const vout_display_place_t *p_place );
 bool            EventThreadGetAndResetHasMoved( event_thread_t * );
 



More information about the vlc-commits mailing list