[vlc-devel] commit: Fixed invalid video dimensions after int->unsigned changes. ( Laurent Aimar )

git version control git at videolan.org
Sat Aug 29 18:24:12 CEST 2009


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sat Aug 29 18:18:15 2009 +0200| [bdc1e21610c7fce4dc66af849189e51847c54230] | committer: Laurent Aimar 

Fixed invalid video dimensions after int->unsigned changes.

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

 modules/video_output/wrapper.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/modules/video_output/wrapper.c b/modules/video_output/wrapper.c
index c6ac359..69fbf92 100644
--- a/modules/video_output/wrapper.c
+++ b/modules/video_output/wrapper.c
@@ -438,8 +438,10 @@ static void VoutGetDisplayCfg(vout_thread_t *vout, vout_display_cfg_t *cfg, cons
     /* Load configuration */
     cfg->is_fullscreen = var_CreateGetBool(vout, "fullscreen");
     cfg->display.title = title;
-    cfg->display.width   = var_CreateGetInteger(vout, "width");
-    cfg->display.height  = var_CreateGetInteger(vout, "height");
+    const int display_width = var_CreateGetInteger(vout, "width");
+    const int display_height = var_CreateGetInteger(vout, "height");
+    cfg->display.width   = display_width > 0  ? display_width  : 0;
+    cfg->display.height  = display_height > 0 ? display_height : 0;
     cfg->is_display_filled  = var_CreateGetBool(vout, "autoscale");
     cfg->display.sar.num = 1; /* TODO monitor AR */
     cfg->display.sar.den = 1;




More information about the vlc-devel mailing list