]> git.sesse.net Git - vlc/commitdiff
Fixed no autoscale video mode (close #3246).
authorLaurent Aimar <fenrir@videolan.org>
Mon, 8 Feb 2010 21:40:43 +0000 (22:40 +0100)
committerLaurent Aimar <fenrir@videolan.org>
Mon, 8 Feb 2010 21:43:06 +0000 (22:43 +0100)
src/video_output/display.c

index 5639deadce38b82d5c380ee587f4b182f25464c6..7a40c302c382f16cab2d13ef98b09557c436c4df 100644 (file)
@@ -208,14 +208,10 @@ void vout_display_PlacePicture(vout_display_place_t *place,
         return;
 
     /* */
-    unsigned width;
-    unsigned height;
     unsigned display_width;
     unsigned display_height;
 
     if (cfg->is_display_filled) {
-        width  = source->i_visible_width;
-        height = source->i_visible_height;
         display_width  = cfg->display.width;
         display_height = cfg->display.height;
     } else {
@@ -223,17 +219,17 @@ void vout_display_PlacePicture(vout_display_place_t *place,
 
         cfg_tmp.display.width  = 0;
         cfg_tmp.display.height = 0;
-        vout_display_GetDefaultDisplaySize(&width, &height,
+        vout_display_GetDefaultDisplaySize(&display_width, &display_height,
                                            source, &cfg_tmp);
 
-        display_width  = width;
-        display_height = height;
         if (do_clipping) {
             display_width  = __MIN(display_width,  cfg->display.width);
             display_height = __MIN(display_height, cfg->display.height);
         }
     }
 
+    const unsigned width  = source->i_visible_width;
+    const unsigned height = source->i_visible_height;
     /* Compute the height if we use the width to fill up display_width */
     const int64_t scaled_height = (int64_t)height * display_width  * cfg->display.sar.num * source->i_sar_den / width  / source->i_sar_num / cfg->display.sar.den;
     /* And the same but switching width/height */