changeset 2699:49c540731133 libavformat

Make get_v() available to the other demuxers
author kostya
date Sat, 03 Nov 2007 18:26:42 +0000
parents 26a111e617a8
children dfcac0102c34
files avio.h aviobuf.c nutdec.c
diffstat 3 files changed, 13 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/avio.h	Sat Nov 03 14:57:26 2007 +0000
+++ b/avio.h	Sat Nov 03 18:26:42 2007 +0000
@@ -192,6 +192,8 @@
 unsigned int get_be32(ByteIOContext *s);
 uint64_t get_be64(ByteIOContext *s);
 
+uint64_t get_v(ByteIOContext *bc);
+
 static inline int url_is_streamed(ByteIOContext *s)
 {
     return s->is_streamed;
--- a/aviobuf.c	Sat Nov 03 14:57:26 2007 +0000
+++ b/aviobuf.c	Sat Nov 03 18:26:42 2007 +0000
@@ -472,6 +472,17 @@
     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 */
 
 #ifdef CONFIG_MUXERS
--- a/nutdec.c	Sat Nov 03 14:57:26 2007 +0000
+++ b/nutdec.c	Sat Nov 03 18:26:42 2007 +0000
@@ -27,17 +27,6 @@
 #undef NDEBUG
 #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){
     unsigned int len= get_v(bc);