[vlc-devel] [PATCH 14/24] vout: fb: refactor for next changes
Thomas Guillem
thomas at gllm.fr
Wed Oct 31 17:50:09 CET 2018
vd->fmt and vd->cfg will be removed.
fmt and cfg will be passed by Open() and controls.
---
modules/video_output/fb.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/modules/video_output/fb.c b/modules/video_output/fb.c
index 9666bfa1c7..f3da704840 100644
--- a/modules/video_output/fb.c
+++ b/modules/video_output/fb.c
@@ -173,9 +173,11 @@ static void ClearScreen(vout_display_sys_t *sys)
static int Open(vlc_object_t *object)
{
vout_display_t *vd = (vout_display_t *)object;
+ const vout_display_cfg_t *cfg = vd->cfg;
+ video_format_t *fmtp = &vd->fmt;
vout_display_sys_t *sys;
- if (vout_display_IsWindowed(vd))
+ if (vout_display_cfg_IsWindowed(cfg))
return VLC_EGENERIC;
/* Allocate instance and initialize some members */
@@ -256,7 +258,7 @@ static int Open(vlc_object_t *object)
/* */
video_format_t fmt;
- video_format_ApplyRotation(&fmt, &vd->fmt);
+ video_format_ApplyRotation(&fmt, fmtp);
if (sys->chroma) {
fmt.i_chroma = sys->chroma;
@@ -299,7 +301,7 @@ static int Open(vlc_object_t *object)
fmt.i_visible_height = sys->height;
/* */
- vd->fmt = fmt;
+ *fmtp = fmt;
vd->pool = Pool;
vd->prepare = NULL;
vd->display = Display;
--
2.19.1
More information about the vlc-devel
mailing list