[FFmpeg-devel] [PATCH] make get_v available outside nut demuxer
Kostya
kostya.shishkov
Sat Nov 3 17:12:20 CET 2007
Since Musepack SV8 uses NUT method for storing some variables
and maybe other containers will follow, here's the trivial
patch to make get_v() available to them.
-------------- next part --------------
Index: libavformat/avio.h
===================================================================
--- libavformat/avio.h (revision 10907)
+++ libavformat/avio.h (working copy)
@@ -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;
Index: libavformat/aviobuf.c
===================================================================
--- libavformat/aviobuf.c (revision 10907)
+++ libavformat/aviobuf.c (working copy)
@@ -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
Index: libavformat/nutdec.c
===================================================================
--- libavformat/nutdec.c (revision 10907)
+++ libavformat/nutdec.c (working copy)
@@ -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);
More information about the ffmpeg-devel
mailing list