[vlc-commits] caca: set the value in the output video format directly

Steve Lhomme git at videolan.org
Wed Sep 2 09:56:22 CEST 2020


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Sep  2 09:15:05 2020 +0200| [5a2b86b8d60124bb8b64ab5cfbe0fbfd035a7901] | committer: Steve Lhomme

caca: set the value in the output video format directly

No need for an intermediate format.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5a2b86b8d60124bb8b64ab5cfbe0fbfd035a7901
---

 modules/video_output/caca.c | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/modules/video_output/caca.c b/modules/video_output/caca.c
index abc9c6d9f8..21fbd53e6e 100644
--- a/modules/video_output/caca.c
+++ b/modules/video_output/caca.c
@@ -480,17 +480,14 @@ static int Open(vout_display_t *vd, const vout_display_cfg_t *cfg,
     sys->cursor_deadline = INVALID_DEADLINE;
 
     /* Fix format */
-    video_format_t fmt = *fmtp;
-    if (fmt.i_chroma != VLC_CODEC_RGB32) {
-        fmt.i_chroma = VLC_CODEC_RGB32;
-        fmt.i_rmask = 0x00ff0000;
-        fmt.i_gmask = 0x0000ff00;
-        fmt.i_bmask = 0x000000ff;
+    if (fmtp->i_chroma != VLC_CODEC_RGB32) {
+        fmtp->i_chroma = VLC_CODEC_RGB32;
+        fmtp->i_rmask = 0x00ff0000;
+        fmtp->i_gmask = 0x0000ff00;
+        fmtp->i_bmask = 0x000000ff;
     }
 
     /* Setup vout_display now that everything is fine */
-    *fmtp = fmt;
-
     vd->prepare = Prepare;
     vd->display = PictureDisplay;
     vd->control = Control;



More information about the vlc-commits mailing list