Mercurial > libavformat.hg
changeset 1682:1c6ee4cf8a38 libavformat
simplify
author | michael |
---|---|
date | Sun, 21 Jan 2007 12:43:29 +0000 |
parents | 23c911d09382 |
children | 8b062c65fe0d |
files | nutdec.c |
diffstat | 1 files changed, 6 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/nutdec.c Sun Jan 21 12:31:58 2007 +0000 +++ b/nutdec.c Sun Jan 21 12:43:29 2007 +0000 @@ -29,18 +29,13 @@ static uint64_t get_v(ByteIOContext *bc){ uint64_t val = 0; - - for(;;) - { - int tmp = get_byte(bc); + int tmp; - if (tmp&0x80) - val= (val<<7) + tmp - 0x80; - else{ - return (val<<7) + tmp; - } - } - return -1; + do{ + tmp = get_byte(bc); + val= (val<<7) + (tmp&127); + }while(tmp&128); + return val; } static int get_str(ByteIOContext *bc, char *string, unsigned int maxlen){