summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorphintuka <phintuka>2009-09-28 12:22:14 +0000
committerphintuka <phintuka>2009-09-28 12:22:14 +0000
commitd5fc0d27b3e89cd2bc800e6f211bfba216bd1885 (patch)
tree1134bb78b38622db1d072c7f63759c6d07dc772c
parent598712a4e90dbd96255a7befa753d22909c233be (diff)
downloadxineliboutput-d5fc0d27b3e89cd2bc800e6f211bfba216bd1885.tar.gz
xineliboutput-d5fc0d27b3e89cd2bc800e6f211bfba216bd1885.tar.bz2
Fixed sending complex OSDs (compressed size > 256k)
-rw-r--r--frontend_svr.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/frontend_svr.c b/frontend_svr.c
index f316c8e7..fff96e55 100644
--- a/frontend_svr.c
+++ b/frontend_svr.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: frontend_svr.c,v 1.81 2009-09-09 12:38:12 phintuka Exp $
+ * $Id: frontend_svr.c,v 1.82 2009-09-28 12:22:14 phintuka Exp $
*
*/
@@ -52,6 +52,9 @@
#define PLAYFILE_CTRL_TIMEOUT 300 /* ms */
#define PLAYFILE_TIMEOUT 20000 /* ms */
+#undef MIN
+#define MIN(a,b) ( (a) < (b) ? (a) : (b))
+
typedef struct {
int Size;
uchar *Data;
@@ -241,7 +244,7 @@ static int write_osd_command(cxSocket& s, osd_command_t *cmd)
(ssize_t)(sizeof(xine_clut_t) * ntohl(cmd->colors)) +
(ssize_t)(ntohl(cmd->datalen));
- if(max > 0 && max < size) {
+ if(max > 0 && max < MIN(size, 32768)) {
/* #warning TODO: buffer latest failed OSD and retry
-> skipped OSDs can be left out but
latest will be always delivered */