[vlc-devel] commit: Take care of different input/canvas aspect-ratio (Ilkka Ollakka )
git version control
git at videolan.org
Sun Aug 31 22:38:41 CEST 2008
vlc | branch: 0.9-bugfix | Ilkka Ollakka <ileoo at videolan.org> | Sun Aug 31 20:37:11 2008 +0300| [feec78144f60f7c3dfeb204cdf107633a3bc2f14] | committer: Antoine Cellerier
Take care of different input/canvas aspect-ratio
(cherry picked from commit 855f97386fe2405bd6f8b225949136d78f7a06b5)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=feec78144f60f7c3dfeb204cdf107633a3bc2f14
---
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