[vlc-devel] [PATCH] vmem: client should get display resolution too
sergey radionov
rsatom at gmail.com
Thu Apr 25 17:37:54 CEST 2019
to be able display frames correctly
---
modules/video_output/vmem.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/modules/video_output/vmem.c b/modules/video_output/vmem.c
index 87ea3244f4..ee5e544656 100644
--- a/modules/video_output/vmem.c
+++ b/modules/video_output/vmem.c
@@ -144,13 +144,22 @@ static int Open(vout_display_t *vd, const vout_display_cfg_t *cfg,
memset(sys->pitches, 0, sizeof(sys->pitches));
memset(sys->lines, 0, sizeof(sys->lines));
- if (setup(&sys->opaque, chroma, &fmt.i_width, &fmt.i_height,
+ unsigned widths[2], heights[2];
+ widths[0] = fmt.i_width;
+ widths[1] = fmt.i_visible_width;
+
+ heights[0] = fmt.i_height;
+ heights[1] = fmt.i_visible_height;
+
+ if (setup(&sys->opaque, chroma, widths, heights,
sys->pitches, sys->lines) == 0) {
msg_Err(vd, "video format setup failure (no pictures)");
free(sys);
return VLC_EGENERIC;
}
fmt.i_chroma = vlc_fourcc_GetCodecFromString(VIDEO_ES, chroma);
+ fmt.i_width = widths[0];
+ fmt.i_height = heights[0];
} else {
char *chroma = var_InheritString(vd, "vmem-chroma");
--
2.19.1
More information about the vlc-devel
mailing list