changeset 26823:a9aae3d4721d

Saner handling of VOCTRL_PAUSE/VOCTRL_RESUME
author reimar
date Thu, 22 May 2008 20:21:19 +0000
parents 463a89df437d
children 6112b693fab9
files libvo/vo_gl.c libvo/vo_gl2.c
diffstat 2 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_gl.c	Thu May 22 20:09:44 2008 +0000
+++ b/libvo/vo_gl.c	Thu May 22 20:21:19 2008 +0000
@@ -935,8 +935,10 @@
 static int control(uint32_t request, void *data, ...)
 {
   switch (request) {
-  case VOCTRL_PAUSE: return int_pause = 1;
-  case VOCTRL_RESUME: return int_pause = 0;
+  case VOCTRL_PAUSE:
+  case VOCTRL_RESUME:
+    int_pause = (request == VOCTRL_PAUSE);
+    return VO_TRUE;
   case VOCTRL_QUERY_FORMAT:
     return query_format(*((uint32_t*)data));
   case VOCTRL_GET_IMAGE:
--- a/libvo/vo_gl2.c	Thu May 22 20:09:44 2008 +0000
+++ b/libvo/vo_gl2.c	Thu May 22 20:21:19 2008 +0000
@@ -870,8 +870,10 @@
 static int control(uint32_t request, void *data, ...)
 {
   switch (request) {
-    case VOCTRL_PAUSE: return int_pause = 1;
-    case VOCTRL_RESUME: return int_pause = 0;
+    case VOCTRL_PAUSE:
+    case VOCTRL_RESUME:
+      int_pause = (request == VOCTRL_PAUSE);
+      return VO_TRUE;
     case VOCTRL_QUERY_FORMAT:
       return query_format(*((uint32_t*)data));
     case VOCTRL_GUISUPPORT: