Mercurial > libavformat.hg
comparison nutdec.c @ 2699:49c540731133 libavformat
Make get_v() available to the other demuxers
author | kostya |
---|---|
date | Sat, 03 Nov 2007 18:26:42 +0000 |
parents | 153d6efc05b8 |
children | dfcac0102c34 |
comparison
equal
deleted
inserted
replaced
2698:26a111e617a8 | 2699:49c540731133 |
---|---|
24 #include "nut.h" | 24 #include "nut.h" |
25 #include "avstring.h" | 25 #include "avstring.h" |
26 | 26 |
27 #undef NDEBUG | 27 #undef NDEBUG |
28 #include <assert.h> | 28 #include <assert.h> |
29 | |
30 static uint64_t get_v(ByteIOContext *bc){ | |
31 uint64_t val = 0; | |
32 int tmp; | |
33 | |
34 do{ | |
35 tmp = get_byte(bc); | |
36 val= (val<<7) + (tmp&127); | |
37 }while(tmp&128); | |
38 return val; | |
39 } | |
40 | 29 |
41 static int get_str(ByteIOContext *bc, char *string, unsigned int maxlen){ | 30 static int get_str(ByteIOContext *bc, char *string, unsigned int maxlen){ |
42 unsigned int len= get_v(bc); | 31 unsigned int len= get_v(bc); |
43 | 32 |
44 if(len && maxlen) | 33 if(len && maxlen) |