[MPlayer-cvslog] r25855 - trunk/stream/stream_dvdnav.c

ben subversion at mplayerhq.hu
Sat Jan 26 14:06:42 CET 2008


Author: ben
Date: Sat Jan 26 14:06:42 2008
New Revision: 25855

Log:
remove the spu_set field, replaced by a flag

Modified:
   trunk/stream/stream_dvdnav.c

Modified: trunk/stream/stream_dvdnav.c
==============================================================================
--- trunk/stream/stream_dvdnav.c	(original)
+++ trunk/stream/stream_dvdnav.c	Sat Jan 26 14:06:42 2008
@@ -29,6 +29,7 @@ typedef enum {
   NAV_FLAG_WAIT_READ_AUTO       = 1 << 4,  /* wait read auto mode */
   NAV_FLAG_WAIT_READ            = 1 << 5,  /* suspend read from stream */
   NAV_FLAG_VTS_DOMAIN           = 1 << 6,  /* vts domain */
+  NAV_FLAG_SPU_SET              = 1 << 7,  /* spu_clut is valid */
 } dvdnav_state_t;
 
 typedef struct {
@@ -37,7 +38,7 @@ typedef struct {
   unsigned int     duration;            /* in milliseconds */
   int              mousex, mousey;
   int              title;
-  unsigned int     spu_clut[16], spu_set;
+  unsigned int     spu_clut[16];
   dvdnav_highlight_event_t hlev;
   int              still_length;        /* still frame duration */
   unsigned int     state;
@@ -219,7 +220,7 @@ static int dvdnav_stream_read(dvdnav_pri
       }
       case DVDNAV_SPU_CLUT_CHANGE: {
         memcpy(priv->spu_clut, buf, 16*sizeof(unsigned int));
-        priv->spu_set = 1;
+        priv->state |= NAV_FLAG_SPU_SET;
         break;
       }
       case DVDNAV_WAIT: {
@@ -805,7 +806,7 @@ int dvdnav_number_of_subs(stream_t *stre
  */
 unsigned int *mp_dvdnav_get_spu_clut(stream_t *stream) {
     dvdnav_priv_t *priv=(dvdnav_priv_t*)stream->priv;
-    if(!priv->spu_set) return NULL;
+    if (!(priv->state & NAV_FLAG_SPU_SET)) return NULL;
     return priv->spu_clut;
 }
 



More information about the MPlayer-cvslog mailing list