[MPlayer-cvslog] r35879 - trunk/gui/skin/skin.c

ib subversion at mplayerhq.hu
Fri Jan 25 15:47:30 CET 2013


Author: ib
Date: Fri Jan 25 15:47:30 2013
New Revision: 35879

Log:
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).

Modified:
   trunk/gui/skin/skin.c

Modified: trunk/gui/skin/skin.c
==============================================================================
--- trunk/gui/skin/skin.c	Fri Jan 25 15:42:21 2013	(r35878)
+++ trunk/gui/skin/skin.c	Fri Jan 25 15:47:30 2013	(r35879)
@@ -305,6 +305,10 @@ static int item_base(char *in)
 
     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 @@ static int item_base(char *in)
 
     currWin->width  = currWin->Bitmap.Width;
     currWin->height = currWin->Bitmap.Height;
+    }
 
     if (is_video) {
         if (w && h) {
@@ -321,6 +326,9 @@ static int item_base(char *in)
         }
     }
 
+    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) {


More information about the MPlayer-cvslog mailing list