[vlc-devel] [PATCH 05/10] vout: pass the format that goes with the vctx in vout_OpenWrapper()
Steve Lhomme
robux4 at ycbcr.xyz
Thu Jul 16 15:58:03 CEST 2020
This way only video_output.c needs to know about the original format.
---
src/video_output/video_output.c | 2 +-
src/video_output/vout_internal.h | 2 +-
src/video_output/vout_wrapper.c | 5 ++---
3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 4c209ff2924..af12f6e7262 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1617,7 +1617,7 @@ static int vout_Start(vout_thread_t *vout, vlc_video_context *vctx, const vout_c
dcfg.window_props.width = sys->window_width;
dcfg.window_props.height = sys->window_height;
- sys->display = vout_OpenWrapper(vout, sys->splitter_name, &dcfg, vctx);
+ sys->display = vout_OpenWrapper(vout, sys->splitter_name, &dcfg, &sys->original, vctx);
if (sys->display == NULL) {
vlc_mutex_unlock(&sys->display_lock);
goto error;
diff --git a/src/video_output/vout_internal.h b/src/video_output/vout_internal.h
index abeb4c24e57..7003ad83a1c 100644
--- a/src/video_output/vout_internal.h
+++ b/src/video_output/vout_internal.h
@@ -265,7 +265,7 @@ void vout_IntfDeinit(vlc_object_t *);
/* */
vout_display_t *vout_OpenWrapper(vout_thread_t *, const char *,
- const vout_display_cfg_t *, vlc_video_context *);
+ const vout_display_cfg_t *, video_format_t *, vlc_video_context *);
void vout_CloseWrapper(vout_thread_t *, vout_display_t *vd);
/* */
diff --git a/src/video_output/vout_wrapper.c b/src/video_output/vout_wrapper.c
index 9e5b14a56bc..2c2d896f5a0 100644
--- a/src/video_output/vout_wrapper.c
+++ b/src/video_output/vout_wrapper.c
@@ -56,7 +56,7 @@ static void VoutViewpointMoved(void *sys, const vlc_viewpoint_t *vp)
*****************************************************************************/
vout_display_t *vout_OpenWrapper(vout_thread_t *vout,
const char *splitter_name, const vout_display_cfg_t *cfg,
- vlc_video_context *vctx)
+ video_format_t *fmt, vlc_video_context *vctx)
{
vout_thread_sys_t *sys = vout->p;
vout_display_t *vd;
@@ -73,8 +73,7 @@ vout_display_t *vout_OpenWrapper(vout_thread_t *vout,
else
modlist = "splitter,none";
- vd = vout_display_New(VLC_OBJECT(vout), &sys->original, vctx, cfg,
- modlist, &owner);
+ vd = vout_display_New(VLC_OBJECT(vout), fmt, vctx, cfg, modlist, &owner);
free(modlistbuf);
if (vd == NULL)
--
2.26.2
More information about the vlc-devel
mailing list