[vlc-devel] commit: Take care of different input/canvas aspect-ratio (Ilkka Ollakka )
git version control
git at videolan.org
Sun Aug 31 19:34:55 CEST 2008
vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Sun Aug 31 20:37:11 2008 +0300| [855f97386fe2405bd6f8b225949136d78f7a06b5] | committer: Ilkka Ollakka
Take care of different input/canvas aspect-ratio
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=855f97386fe2405bd6f8b225949136d78f7a06b5
---
modules/video_filter/canvas.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/modules/video_filter/canvas.c b/modules/video_filter/canvas.c
index 6544d9a..2afa31b 100644
--- a/modules/video_filter/canvas.c
+++ b/modules/video_filter/canvas.c
@@ -164,11 +164,15 @@ static int Activate( vlc_object_t *p_this )
fmt.video.i_width = i_width;
fmt.video.i_height = ( p_filter->fmt_in.video.i_height * i_width )
/ p_filter->fmt_in.video.i_width;
+ fmt.video.i_height = ( fmt.video.i_height * i_aspect )
+ / p_filter->fmt_in.video.i_aspect;
if( fmt.video.i_height > i_height )
{
fmt.video.i_height = i_height;
fmt.video.i_width = ( p_filter->fmt_in.video.i_width * i_height )
/ p_filter->fmt_in.video.i_height;
+ fmt.video.i_width = ( fmt.video.i_width * p_filter->fmt_in.video.i_aspect )
+ / i_aspect;
if( fmt.video.i_width & 1 ) fmt.video.i_width -= 1;
i_padd = (i_width - fmt.video.i_width) / 2;
i_offset = (i_padd & 1);
More information about the vlc-devel
mailing list