[vlc-devel] [PATCH 4/5] vout: assume aspect ratio is 1:1 if information is missing

Felix Abecassis felix.abecassis at gmail.com
Wed Jan 29 16:37:44 CET 2014


Avoid signalling a change of aspect-ratio when it only changed from
1:1 to 0:0.
---
 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 52ffb61..d4cb5f7 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -1182,8 +1182,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) {
-- 
1.8.3.2




More information about the vlc-devel mailing list