[vlc-devel] [PATCH 5/5] Make xcb_x11 vout module handle rotated movies.

Matthias Keiser matthias at tristan-inc.com
Fri Mar 14 14:24:39 CET 2014


Am 14.03.2014 um 13:35 schrieb Rémi Denis-Courmont <remi at remlab.net>:

> On Fri, 14 Mar 2014 12:23:05 +0100, Matthias Keiser
> <matthias at tristan-inc.com> wrote:
>> void video_format_ApplyRotation( const video_format_t * restrict in,
>> video_format_t * restrict out );
>> 
>> As I said, counterintuitive, sorry.
> 
> Well fair enough yes. But even I still don't see why we need this given
> there is already a call to ApplyRotation down below.

Aha! I didn't see that, thanks. However I'd argue that we should keep the first call, if only for keeping it similar to the other modules. But I think both version would be ok, so please proceed as you see fit.

---
 modules/video_output/xcb/x11.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/modules/video_output/xcb/x11.c b/modules/video_output/xcb/x11.c
index 7bdb944..d2e360e 100644
--- a/modules/video_output/xcb/x11.c
+++ b/modules/video_output/xcb/x11.c
@@ -112,6 +112,9 @@ static int Open (vlc_object_t *obj)
     vd->sys = sys;
     sys->pool = NULL;
 
+    video_format_t fmt_rot = vd->fmt;
+    video_format_ApplyRotation(&fmt_rot, &vd->fmt);
+
     /* Get window, connect to X server */
     xcb_connection_t *conn;
     const xcb_screen_t *scr;
@@ -139,7 +142,7 @@ static int Open (vlc_object_t *obj)
         if (fmt->depth <= sys->depth)
             continue; /* no better than earlier format */
 
-        video_format_ApplyRotation(&vd->fmt, &fmt_pic);
+        fmt_pic = vd->fmt;
 
         /* Check that the pixmap format is supported by VLC. */
         switch (fmt->depth)
-- 
1.8.3.4 (Apple Git-47)





More information about the vlc-devel mailing list