[vlc-commits] mmal: vout: fill the video_format_t passed to VOUT_DISPLAY_RESET_PICTURES
Steve Lhomme
git at videolan.org
Tue Aug 25 15:33:22 CEST 2020
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Aug 25 07:24:50 2020 +0200| [124e1a282245cbeacc0e16cb61d1323a6782d3e2] | committer: Steve Lhomme
mmal: vout: fill the video_format_t passed to VOUT_DISPLAY_RESET_PICTURES
Don't write vd->fmt directly.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=124e1a282245cbeacc0e16cb61d1323a6782d3e2
---
modules/hw/mmal/vout.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/modules/hw/mmal/vout.c b/modules/hw/mmal/vout.c
index 5889d3d55e..e59fbbd223 100644
--- a/modules/hw/mmal/vout.c
+++ b/modules/hw/mmal/vout.c
@@ -713,12 +713,15 @@ static int vd_control(vout_display_t *vd, int query, va_list args)
break;
case VOUT_DISPLAY_RESET_PICTURES:
+ {
msg_Warn(vd, "Reset Pictures");
kill_pool(sys);
- vd->fmt = vd->source; // Take (nearly) whatever source wants to give us
- vd->fmt.i_chroma = req_chroma(&vd->fmt); // Adjust chroma to something we can actually deal with
+ video_format_t *fmt = va_arg(args, video_format_t *);
+ *fmt = vd->source; // Take (nearly) whatever source wants to give us
+ fmt->i_chroma = req_chroma(fmt); // Adjust chroma to something we can actually deal with
ret = VLC_SUCCESS;
break;
+ }
case VOUT_DISPLAY_CHANGE_ZOOM:
msg_Warn(vd, "Unsupported control query %d", query);
More information about the vlc-commits
mailing list