diff options
-rw-r--r-- | frontend_local.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/frontend_local.c b/frontend_local.c index e46d6b88..6a4006c4 100644 --- a/frontend_local.c +++ b/frontend_local.c @@ -4,10 +4,12 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: frontend_local.c,v 1.40 2009-05-31 16:51:26 phintuka Exp $ + * $Id: frontend_local.c,v 1.41 2009-06-01 14:01:28 phintuka Exp $ * */ +#define __STDC_CONSTANT_MACROS + #include <stdlib.h> #include <string.h> #include <stdio.h> @@ -165,17 +167,18 @@ int64_t cXinelibLocal::GetSTC() { TRACEF("cXinelibLocal::GetSTC"); - int64_t pts = -1; - char buf[32] = {0}; - strcpy(buf, "GETSTC\r\n"); + union { + char buf[32]; + int64_t pts; + } u = {"GETSTC\r\n"}; LOCK_FE; - if(fe && m_bReady) - if(0 == fe->xine_control(fe, (char*)buf)) - //if(*((int64_t *)buf) < MAX_SCR) - // if(*((int64_t *)buf) >= 0LL) - pts = *((int64_t *)buf); - return pts; + + if (fe && m_bReady) + if (0 == fe->xine_control(fe, u.buf)) + return u.pts; + + return INT64_C(-1); } // |