[vlc-commits] vout: android: simplify
Thomas Guillem
git at videolan.org
Mon Nov 28 16:37:47 CET 2016
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Nov 25 15:12:08 2016 +0100| [de4b40698dc562700e85611d81f22b752e069690] | committer: Thomas Guillem
vout: android: simplify
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=de4b40698dc562700e85611d81f22b752e069690
---
modules/video_output/android/display.c | 47 +++++++++++++++-------------------
1 file changed, 21 insertions(+), 26 deletions(-)
diff --git a/modules/video_output/android/display.c b/modules/video_output/android/display.c
index 18ea4a2..45782c5 100644
--- a/modules/video_output/android/display.c
+++ b/modules/video_output/android/display.c
@@ -1086,35 +1086,30 @@ static int Control(vout_display_t *vd, int query, va_list args)
}
case VOUT_DISPLAY_CHANGE_SOURCE_CROP:
case VOUT_DISPLAY_CHANGE_SOURCE_ASPECT:
- case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE:
{
- if (query == VOUT_DISPLAY_CHANGE_SOURCE_ASPECT
- || query == VOUT_DISPLAY_CHANGE_SOURCE_CROP) {
- const video_format_t *source;
-
- msg_Dbg(vd, "change source crop/aspect");
- source = va_arg(args, const video_format_t *);
-
- if (query == VOUT_DISPLAY_CHANGE_SOURCE_CROP) {
- video_format_CopyCrop(&sys->p_window->fmt, source);
- AndroidWindow_UpdateCrop(sys, sys->p_window);
- } else
- CopySourceAspect(&sys->p_window->fmt, source);
-
- UpdateWindowSize(sys, &sys->p_window->fmt,
- sys->p_window->b_use_priv);
- } else {
- const vout_display_cfg_t *cfg;
-
- cfg = va_arg(args, const vout_display_cfg_t *);
-
- sys->i_display_width = cfg->display.width;
- sys->i_display_height = cfg->display.height;
- msg_Dbg(vd, "change display size: %dx%d", sys->i_display_width,
- sys->i_display_height);
- }
+ msg_Dbg(vd, "change source crop/aspect");
+ const video_format_t *source = va_arg(args, const video_format_t *);
+
+ if (query == VOUT_DISPLAY_CHANGE_SOURCE_CROP) {
+ video_format_CopyCrop(&sys->p_window->fmt, source);
+ AndroidWindow_UpdateCrop(sys, sys->p_window);
+ } else
+ CopySourceAspect(&sys->p_window->fmt, source);
+
+ UpdateWindowSize(sys, &sys->p_window->fmt,
+ sys->p_window->b_use_priv);
FixSubtitleFormat(sys);
+ return VLC_SUCCESS;
+ }
+ case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE:
+ {
+ const vout_display_cfg_t *cfg = va_arg(args, const vout_display_cfg_t *);
+ sys->i_display_width = cfg->display.width;
+ sys->i_display_height = cfg->display.height;
+ msg_Dbg(vd, "change display size: %dx%d", sys->i_display_width,
+ sys->i_display_height);
+ FixSubtitleFormat(sys);
return VLC_SUCCESS;
}
default:
More information about the vlc-commits
mailing list