[vlc-commits] Fixed video AR given to the encoder when transcoding.

Laurent Aimar git at videolan.org
Tue Jan 10 20:54:13 CET 2012


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Tue Jan 10 20:48:40 2012 +0100| [45ee0e5c08f3ace0cb314f9108839ce856ba3f4e] | committer: Laurent Aimar

Fixed video AR given to the encoder when transcoding.

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

 modules/stream_out/transcode/video.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/stream_out/transcode/video.c b/modules/stream_out/transcode/video.c
index 189ffd1..130f64b 100644
--- a/modules/stream_out/transcode/video.c
+++ b/modules/stream_out/transcode/video.c
@@ -480,8 +480,8 @@ static void transcode_video_encoder_init( sout_stream_t *p_stream,
                      id->p_decoder->fmt_out.video.i_sar_den,
                      0 );
 
-        id->p_encoder->fmt_out.video.i_sar_num = id->p_decoder->fmt_out.video.i_sar_num * i_src_width / i_dst_width;
-        id->p_encoder->fmt_out.video.i_sar_den = id->p_decoder->fmt_out.video.i_sar_den * i_src_height / i_dst_height;
+        id->p_encoder->fmt_out.video.i_sar_num = id->p_decoder->fmt_out.video.i_sar_num * i_src_width  * i_dst_height;
+        id->p_encoder->fmt_out.video.i_sar_den = id->p_decoder->fmt_out.video.i_sar_den * i_src_height * i_dst_width;
     }
     vlc_ureduce( &id->p_encoder->fmt_out.video.i_sar_num,
                  &id->p_encoder->fmt_out.video.i_sar_den,



More information about the vlc-commits mailing list