[vlc-commits] display: remove useless vout_DeleteDisplayWindow() argument
Rémi Denis-Courmont
git at videolan.org
Sun May 20 19:51:37 CEST 2018
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed May 16 22:29:03 2018 +0300| [ba8fc0dbb551d68a6337d897b324cbac8af29f25] | committer: Rémi Denis-Courmont
display: remove useless vout_DeleteDisplayWindow() argument
This function does nothing when the window argument is non-NULL.
This change removes the argument and removes calls where the argument
was not NULL.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ba8fc0dbb551d68a6337d897b324cbac8af29f25
---
src/video_output/display.c | 3 ++-
src/video_output/display.h | 2 +-
src/video_output/video_output.c | 5 ++---
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/video_output/display.c b/src/video_output/display.c
index d601e34d77..a979f01108 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -655,7 +655,8 @@ static void VoutDisplayDelWindow(vout_display_t *vd, vout_window_t *window)
if (window != NULL)
vout_display_window_Detach(window);
- vout_DeleteDisplayWindow(osys->vout, window);
+ else
+ vout_DeleteDisplayWindow(osys->vout);
}
static void VoutDisplayFitWindow(vout_display_t *vd, bool default_size)
diff --git a/src/video_output/display.h b/src/video_output/display.h
index 15c22d2f87..aba2f17793 100644
--- a/src/video_output/display.h
+++ b/src/video_output/display.h
@@ -34,7 +34,7 @@ vout_display_t *vout_NewSplitter(vout_thread_t *vout,
void vout_SendDisplayEventMouse(vout_thread_t *, const vlc_mouse_t *);
vout_window_t *vout_NewDisplayWindow(vout_thread_t *);
-void vout_DeleteDisplayWindow(vout_thread_t *, vout_window_t *);
+void vout_DeleteDisplayWindow(vout_thread_t *);
void vout_SetDisplayWindowSize(vout_thread_t *, unsigned, unsigned);
void vout_UpdateDisplaySourceProperties(vout_display_t *vd, const video_format_t *);
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 4e777e055f..0eff8dbeda 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -613,13 +613,12 @@ vout_window_t *vout_NewDisplayWindow(vout_thread_t *vout)
return vout->p->window;
}
-void vout_DeleteDisplayWindow(vout_thread_t *vout, vout_window_t *window)
+void vout_DeleteDisplayWindow(vout_thread_t *vout)
{
- if (window == NULL && vout->p->window != NULL) {
+ if (vout->p->window != NULL) {
vout_display_window_Delete(vout->p->window);
vout->p->window = NULL;
}
- assert(vout->p->window == window);
}
void vout_SetDisplayWindowSize(vout_thread_t *vout,
More information about the vlc-commits
mailing list