Commit 99d8f3b9 authored by kostya's avatar kostya

Make get_v() available to the other demuxers

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@10911 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 462f5583
...@@ -192,6 +192,8 @@ unsigned int get_be24(ByteIOContext *s); ...@@ -192,6 +192,8 @@ unsigned int get_be24(ByteIOContext *s);
unsigned int get_be32(ByteIOContext *s); unsigned int get_be32(ByteIOContext *s);
uint64_t get_be64(ByteIOContext *s); uint64_t get_be64(ByteIOContext *s);
uint64_t get_v(ByteIOContext *bc);
static inline int url_is_streamed(ByteIOContext *s) static inline int url_is_streamed(ByteIOContext *s)
{ {
return s->is_streamed; return s->is_streamed;
......
...@@ -472,6 +472,17 @@ uint64_t get_be64(ByteIOContext *s) ...@@ -472,6 +472,17 @@ uint64_t get_be64(ByteIOContext *s)
return val; return val;
} }
uint64_t get_v(ByteIOContext *bc){
uint64_t val = 0;
int tmp;
do{
tmp = get_byte(bc);
val= (val<<7) + (tmp&127);
}while(tmp&128);
return val;
}
/* link with avio functions */ /* link with avio functions */
#ifdef CONFIG_MUXERS #ifdef CONFIG_MUXERS
......
...@@ -27,17 +27,6 @@ ...@@ -27,17 +27,6 @@
#undef NDEBUG #undef NDEBUG
#include <assert.h> #include <assert.h>
static uint64_t get_v(ByteIOContext *bc){
uint64_t val = 0;
int tmp;
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){ static int get_str(ByteIOContext *bc, char *string, unsigned int maxlen){
unsigned int len= get_v(bc); unsigned int len= get_v(bc);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment