diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-03-17 16:53:58 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-03-17 17:22:52 +0100 |
commit | 0fecf2642b9d909820683647c70031a954f5e58d (patch) | |
tree | 36ca02de9fa27a049829fb589517223d2d0ce5f5 /libavformat/mpc8.c | |
parent | e309fdc7018a1027d187ec27fb1d69a41a4ee167 (diff) | |
parent | f1f60f5252b0b448adcce0c1c52f3161ee69b9bf (diff) | |
download | ffmpeg-0fecf2642b9d909820683647c70031a954f5e58d.tar.gz |
Merge remote-tracking branch 'newdev/master'
Conflicts:
Changelog
doc/APIchanges
doc/optimization.txt
libavformat/avio.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/mpc8.c')
-rw-r--r-- | libavformat/mpc8.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/libavformat/mpc8.c b/libavformat/mpc8.c index b55bf49650..b18726c6db 100644 --- a/libavformat/mpc8.c +++ b/libavformat/mpc8.c @@ -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,12 +178,12 @@ 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; default: - avio_seek(pb, size, SEEK_CUR); + avio_skip(pb, size); } } @@ -212,14 +213,14 @@ static int mpc8_read_header(AVFormatContext *s, AVFormatParameters *ap) return -1; } pos = avio_tell(pb); - avio_seek(pb, 4, SEEK_CUR); //CRC + avio_skip(pb, 4); //CRC c->ver = avio_r8(pb); if(c->ver != 8){ 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) |