projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f8a32f4
)
simplify
author
Michael Niedermayer
<michaelni@gmx.at>
Sun, 21 Jan 2007 12:43:29 +0000
(12:43 +0000)
committer
Michael Niedermayer
<michaelni@gmx.at>
Sun, 21 Jan 2007 12:43:29 +0000
(12:43 +0000)
Originally committed as revision 7602 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavformat/nutdec.c
patch
|
blob
|
history
diff --git
a/libavformat/nutdec.c
b/libavformat/nutdec.c
index 7e0f8cd9347f65b37a6a5e70355d445601bf40d6..e1583262733c186156f19e562bb1983e3e4b06ff 100644
(file)
--- 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){