diff options
| author | James Courtier-Dutton <jcdutton@users.sourceforge.net> | 2003-04-29 21:55:46 +0000 |
|---|---|---|
| committer | James Courtier-Dutton <jcdutton@users.sourceforge.net> | 2003-04-29 21:55:46 +0000 |
| commit | c226b5c184993b4dc09816e4da08a533b656f934 (patch) | |
| tree | 548c51ffe6a46b5ee36aad927cd6fe9ded7b24fa /src/input/libdvdnav/decoder.c | |
| parent | a1684eb4fdb2a9d9812d994f3a39904b15267905 (diff) | |
| download | xine-lib-c226b5c184993b4dc09816e4da08a533b656f934.tar.gz xine-lib-c226b5c184993b4dc09816e4da08a533b656f934.tar.bz2 | |
Update from libdvdnav
CVS patchset: 4712
CVS date: 2003/04/29 21:55:46
Diffstat (limited to 'src/input/libdvdnav/decoder.c')
| -rw-r--r-- | src/input/libdvdnav/decoder.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/input/libdvdnav/decoder.c b/src/input/libdvdnav/decoder.c index 154bac848..76b1cc048 100644 --- a/src/input/libdvdnav/decoder.c +++ b/src/input/libdvdnav/decoder.c @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: decoder.c,v 1.8 2003/04/07 18:10:45 mroi Exp $ + * $Id: decoder.c,v 1.9 2003/04/29 21:55:47 jcdutton Exp $ * */ @@ -32,14 +32,15 @@ #include <string.h> /* For memset */ #include "ifo_types.h" /* vm_cmd_t */ #include <assert.h> + #include "dvdnav_internal.h" uint32_t vm_getbits(command_t *command, int start, int count) { uint64_t result = 0; - uint64_t bit_mask=0xffffffffffffffff; /* I could put -1 instead */ + uint64_t bit_mask = 0; uint64_t examining = 0; int32_t bits; - + if (count == 0) return 0; if ( ((start - count) < -1) || @@ -50,6 +51,8 @@ uint32_t vm_getbits(command_t *command, int start, int count) { fprintf(MSG_OUT, "libdvdnav: Bad call to vm_getbits. Parameter out of range\n"); assert(0); } + /* all ones, please */ + bit_mask = ~bit_mask; bit_mask >>= 63 - start; bits = start + 1 - count; examining = ((bit_mask >> bits) << bits ); |
