diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2007-01-21 12:43:29 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2007-01-21 12:43:29 +0000 |
commit | 07495657fb32501c1a8b1361ca5680ded1364cd5 (patch) | |
tree | 271ec219c527c3f35add9b0e118c5bb829497c36 /libavformat | |
parent | f8a32f450ade2449873c57e73ad04622c68af136 (diff) | |
download | ffmpeg-07495657fb32501c1a8b1361ca5680ded1364cd5.tar.gz |
simplify
Originally committed as revision 7602 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/nutdec.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c index 7e0f8cd934..e158326273 100644 --- a/libavformat/nutdec.c +++ b/libavformat/nutdec.c @@ -29,18 +29,13 @@ static uint64_t get_v(ByteIOContext *bc){ uint64_t val = 0; + int tmp; - for(;;) - { - int tmp = get_byte(bc); - - 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){ |