diff options
author | Anton Khirnov <anton@khirnov.net> | 2011-02-20 13:04:13 +0300 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-02-20 21:05:47 +0300 |
commit | ae99313aa585fbf74339a2630a37402819f197c6 (patch) | |
tree | 9702b223a8e6ae2b2ed45abf0e65ba3f514f785c /libavformat/matroskadec.c | |
parent | 471fe57e1af2bb37055c93688671c9c79ef9b5cd (diff) |
avio: move init_put_byte() to a new private header and rename it
init_put_byte should never be used outside of lavf, since
sizeof(AVIOContext) isn't part of public ABI.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit e731b8d8729e75bfb69f5540e6446d6118dac549)
Diffstat (limited to 'libavformat/matroskadec.c')
-rw-r--r-- | libavformat/matroskadec.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index b3797047e5..69f08c3142 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -31,6 +31,7 @@ #include <stdio.h> #include "avformat.h" #include "internal.h" +#include "avio_internal.h" /* For ff_codec_get_id(). */ #include "riff.h" #include "isom.h" @@ -698,7 +699,7 @@ static int matroska_ebmlnum_uint(MatroskaDemuxContext *matroska, uint8_t *data, uint32_t size, uint64_t *num) { AVIOContext pb; - init_put_byte(&pb, data, size, 0, NULL, NULL, NULL, NULL); + ffio_init_context(&pb, data, size, 0, NULL, NULL, NULL, NULL); return ebml_read_num(matroska, &pb, FFMIN(size, 8), num); } @@ -1328,7 +1329,7 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap) } else if (!strcmp(track->codec_id, "A_MS/ACM") && track->codec_priv.size >= 14 && track->codec_priv.data != NULL) { - init_put_byte(&b, track->codec_priv.data, track->codec_priv.size, + ffio_init_context(&b, track->codec_priv.data, track->codec_priv.size, URL_RDONLY, NULL, NULL, NULL, NULL); ff_get_wav_header(&b, st->codec, track->codec_priv.size); codec_id = st->codec->codec_id; @@ -1373,7 +1374,7 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap) extradata = av_mallocz(extradata_size); if (extradata == NULL) return AVERROR(ENOMEM); - init_put_byte(&b, extradata, extradata_size, 1, + ffio_init_context(&b, extradata, extradata_size, 1, NULL, NULL, NULL, NULL); put_buffer(&b, "TTA1", 4); put_le16(&b, 1); @@ -1390,7 +1391,7 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap) } else if (codec_id == CODEC_ID_RA_288 || codec_id == CODEC_ID_COOK || codec_id == CODEC_ID_ATRAC3 || codec_id == CODEC_ID_SIPR) { int flavor; - init_put_byte(&b, track->codec_priv.data,track->codec_priv.size, + ffio_init_context(&b, track->codec_priv.data,track->codec_priv.size, 0, NULL, NULL, NULL, NULL); url_fskip(&b, 22); flavor = get_be16(&b); |