[vlc-commits] vout: assume aspect ratio is 1:1 if information is missing

Felix Abecassis git at videolan.org
Sat Feb 8 15:26:21 CET 2014


vlc | branch: master | Felix Abecassis <felix.abecassis at gmail.com> | Wed Jan 29 14:37:44 2014 +0000| [bf5bc83e52ef5b4fd090b74b6d5bd9523b6dcbd7] | committer: Jean-Baptiste Kempf

vout: assume aspect ratio is 1:1 if information is missing

Avoid signalling a change of aspect-ratio when it only changed from
1:1 to 0:0.

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 src/video_output/display.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/video_output/display.c b/src/video_output/display.c
index b268c18..cd107fd 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -1175,8 +1175,9 @@ void vout_SetDisplayAspect(vout_display_t *vd, unsigned dar_num, unsigned dar_de
         sar_den = dar_den * osys->source.i_visible_width;
         vlc_ureduce(&sar_num, &sar_den, sar_num, sar_den, 0);
     } else {
-        sar_num = 0;
-        sar_den = 0;
+        /* Assume 1:1 SAR if the information is missing */
+        sar_num = 1;
+        sar_den = 1;
     }
 
     if (osys->sar.num != sar_num || osys->sar.den != sar_den) {



More information about the vlc-commits mailing list