[vlc-commits] vout: fb: set the picture planes once the picture is created
Steve Lhomme
git at videolan.org
Mon Aug 10 08:51:49 CEST 2020
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Jul 21 13:53:56 2020 +0200| [0a43e484fde89be8e85b93ea708a8c83e7beef5c] | committer: Steve Lhomme
vout: fb: set the picture planes once the picture is created
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0a43e484fde89be8e85b93ea708a8c83e7beef5c
---
modules/video_output/fb.c | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/modules/video_output/fb.c b/modules/video_output/fb.c
index 1538af3465..d8dcf8646a 100644
--- a/modules/video_output/fb.c
+++ b/modules/video_output/fb.c
@@ -596,22 +596,17 @@ 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,
- },
- },
- };
+ picture_resource_t rsc = { 0 };
sys->picture = picture_NewFromResource(&vd->fmt, &rsc);
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);
More information about the vlc-commits
mailing list