[vlc-commits] commit: Simplified mouse handling in transform filter. (Laurent Aimar )

git at videolan.org git at videolan.org
Tue Nov 2 21:20:43 CET 2010


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Mon Nov  1 21:32:50 2010 +0100| [61af3cf939605c6786f28124d640d20053066d3a] | committer: Laurent Aimar 

Simplified mouse handling in transform filter.

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

 modules/video_filter/transform.c |   13 +++----------
 1 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/modules/video_filter/transform.c b/modules/video_filter/transform.c
index 2f70873..5c44f96 100644
--- a/modules/video_filter/transform.c
+++ b/modules/video_filter/transform.c
@@ -163,19 +163,12 @@ static picture_t *Filter(filter_t *filter, picture_t *src)
 static int Mouse(filter_t *filter, vlc_mouse_t *mouse,
                  const vlc_mouse_t *mold, const vlc_mouse_t *mnew)
 {
-    const video_format_t          *fmt = &filter->fmt_in.video;
+    const video_format_t          *fmt = &filter->fmt_out.video;
     const transform_description_t *dsc = filter->p_sys->dsc;
 
     *mouse = *mnew;
-    int w, h;
-    if (dsc->is_rotated) {
-        w = fmt->i_visible_height;
-        h = fmt->i_visible_width;
-    } else {
-        w = fmt->i_visible_width;
-        h = fmt->i_visible_height;
-    }
-    dsc->convert(&mouse->i_x, &mouse->i_y, w, h, mouse->i_x, mouse->i_y);
+    dsc->convert(&mouse->i_x, &mouse->i_y,
+                 fmt->i_visible_width, fmt->i_visible_height, mouse->i_x, mouse->i_y);
     return VLC_SUCCESS;
 }
 



More information about the vlc-commits mailing list