Commit 4839c192 authored by Anton Khirnov's avatar Anton Khirnov Committed by Ronald S. Bultje

lavf: move ff_get_v from avio.h to avio_internal.h

And rename it to ffio_read_varlen.
Signed-off-by: 's avatarRonald S. Bultje <rsbultje@gmail.com>
parent 073f8b10
......@@ -568,8 +568,6 @@ unsigned int avio_rb24(AVIOContext *s);
unsigned int avio_rb32(AVIOContext *s);
uint64_t avio_rb64(AVIOContext *s);
uint64_t ff_get_v(AVIOContext *bc);
static inline int url_is_streamed(AVIOContext *s)
{
return s->is_streamed;
......
......@@ -61,4 +61,6 @@ static av_always_inline void ffio_wfourcc(AVIOContext *pb, const uint8_t *s)
*/
int ffio_rewind_with_probe_data(AVIOContext *s, unsigned char *buf, int buf_size);
uint64_t ffio_read_varlen(AVIOContext *bc);
#endif // AVFORMAT_AVIO_INTERNAL_H
......@@ -753,7 +753,7 @@ uint64_t avio_rb64(AVIOContext *s)
return val;
}
uint64_t ff_get_v(AVIOContext *bc){
uint64_t ffio_read_varlen(AVIOContext *bc){
uint64_t val = 0;
int tmp;
......
......@@ -22,6 +22,7 @@
#include "libavcodec/get_bits.h"
#include "libavcodec/unary.h"
#include "avformat.h"
#include "avio_internal.h"
/// Two-byte MPC tag
#define MKMPCTAG(a, b) (a | (b << 8))
......@@ -122,7 +123,7 @@ static void mpc8_get_chunk_header(AVIOContext *pb, int *tag, int64_t *size)
int64_t pos;
pos = avio_tell(pb);
*tag = avio_rl16(pb);
*size = ff_get_v(pb);
*size = ffio_read_varlen(pb);
*size -= avio_tell(pb) - pos;
}
......@@ -177,7 +178,7 @@ static void mpc8_handle_chunk(AVFormatContext *s, int tag, int64_t chunk_pos, in
switch(tag){
case TAG_SEEKTBLOFF:
pos = avio_tell(pb) + size;
off = ff_get_v(pb);
off = ffio_read_varlen(pb);
mpc8_parse_seektable(s, chunk_pos + off);
avio_seek(pb, pos, SEEK_SET);
break;
......@@ -218,8 +219,8 @@ static int mpc8_read_header(AVFormatContext *s, AVFormatParameters *ap)
av_log(s, AV_LOG_ERROR, "Unknown stream version %d\n", c->ver);
return -1;
}
c->samples = ff_get_v(pb);
ff_get_v(pb); //silence samples at the beginning
c->samples = ffio_read_varlen(pb);
ffio_read_varlen(pb); //silence samples at the beginning
st = av_new_stream(s, 0);
if (!st)
......
This diff is collapsed.
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