summaryrefslogtreecommitdiffstats
path: root/stream/stream_dvdnav.c
diff options
context:
space:
mode:
authorben <ben@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-01-26 13:06:42 +0000
committerben <ben@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-01-26 13:06:42 +0000
commitef8e584e397c26568eafdaaa93c86179a56f29d7 (patch)
tree3d72faf2ca0db3a807a5aea2091c4e2a9b0468de /stream/stream_dvdnav.c
parent6ff2dd356189992be0dad03c41b40693d3968f4d (diff)
downloadmpv-ef8e584e397c26568eafdaaa93c86179a56f29d7.tar.bz2
mpv-ef8e584e397c26568eafdaaa93c86179a56f29d7.tar.xz
remove the spu_set field, replaced by a flag
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25855 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream/stream_dvdnav.c')
-rw-r--r--stream/stream_dvdnav.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/stream/stream_dvdnav.c b/stream/stream_dvdnav.c
index c9d555922d..4397d3b42b 100644
--- a/stream/stream_dvdnav.c
+++ b/stream/stream_dvdnav.c
@@ -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_priv_t * priv, unsigned char *buf, int *len
}
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 *stream) {
*/
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;
}