[vlc-devel] [PATCH 16/19] vout: fb: set the picture planes once the picture is created
Steve Lhomme
robux4 at ycbcr.xyz
Thu Jul 30 14:16:57 CEST 2020
---
modules/video_output/fb.c | 17 +++++------------
1 file changed, 5 insertions(+), 12 deletions(-)
diff --git a/modules/video_output/fb.c b/modules/video_output/fb.c
index 60910d6dba1..223d3c1b0bd 100644
--- a/modules/video_output/fb.c
+++ b/modules/video_output/fb.c
@@ -596,22 +596,15 @@ static int OpenDisplay(vout_display_t *vd, bool force_resolution)
return VLC_EGENERIC;
}
- picture_resource_t rsc = {
- .p = {
- [0] = {
- .p_pixels = sys->video_ptr,
- .i_lines = sys->var_info.yres,
- .i_pitch = fix_info.line_length,
- },
- },
- };
-
- sys->picture = picture_NewFromResource(&vd->fmt, NULL, &rsc);
+ sys->picture = picture_NewFromResource(&vd->fmt, NULL, NULL);
if (unlikely(sys->picture == NULL)) {
- munmap(rsc.p[0].p_pixels, sys->video_size);
+ munmap(sys->video_ptr, sys->video_size);
ioctl(sys->fd, FBIOPUT_VSCREENINFO, &sys->old_info);
return VLC_ENOMEM;
}
+ sys->picture->p[0].p_pixels = sys->video_ptr;
+ sys->picture->p[0].i_lines = sys->var_info.yres;
+ sys->picture->p[0].i_pitch = fix_info.line_length;
ClearScreen(sys);
--
2.26.2
More information about the vlc-devel
mailing list