# HG changeset patch # User ib # Date 1359125250 0 # Node ID 24b744af09a7413a013ba6fb9f54f60c18b87a08 # Parent c4cd95d595679808c062a2ca7fb81ba31fb55989 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). diff -r c4cd95d59567 -r 24b744af09a7 gui/skin/skin.c --- 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) {