changeset 35785:24b744af09a7

Allow video window without image displayed in it. A special value NULL is allowed as image now (in which case width and height are mandatory).
author ib
date Fri, 25 Jan 2013 14:47:30 +0000
parents c4cd95d59567
children 21d852a58d32
files gui/skin/skin.c
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/gui/skin/skin.c	Fri Jan 25 14:42:21 2013 +0000
+++ b/gui/skin/skin.c	Fri Jan 25 14:47:30 2013 +0000
@@ -305,6 +305,10 @@
 
     mp_msg(MSGT_GPLAYER, MSGL_DBG2, "\n");
 
+    if (is_video && (strcmp(fname, "NULL") == 0)) {
+        currWin->width  = 0;
+        currWin->height = 0;
+    } else {
     av_strlcpy(file, path, sizeof(file));
     av_strlcat(file, fname, sizeof(file));
 
@@ -313,6 +317,7 @@
 
     currWin->width  = currWin->Bitmap.Width;
     currWin->height = currWin->Bitmap.Height;
+    }
 
     if (is_video) {
         if (w && h) {
@@ -321,6 +326,9 @@
         }
     }
 
+    if (currWin->width == 0 || currWin->height == 0)
+        return 1;
+
     mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[skin]    %s: %dx%d\n", (is_video && w && h ? "size" : " bitmap"), currWin->width, currWin->height);
 
     if (!is_video) {