[Ffmpeg-cvslog] r7602 - trunk/libavformat/nutdec.c
michael
subversion
Sun Jan 21 13:43:29 CET 2007
Author: michael
Date: Sun Jan 21 13:43:29 2007
New Revision: 7602
Modified:
trunk/libavformat/nutdec.c
Log:
simplify
Modified: trunk/libavformat/nutdec.c
==============================================================================
--- trunk/libavformat/nutdec.c (original)
+++ trunk/libavformat/nutdec.c Sun Jan 21 13:43:29 2007
@@ -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){
More information about the ffmpeg-cvslog
mailing list