diff options
author | Anton Khirnov <anton@khirnov.net> | 2011-02-20 11:04:13 +0100 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2011-02-20 08:37:31 -0500 |
commit | e731b8d8729e75bfb69f5540e6446d6118dac549 (patch) | |
tree | bfefb15c001ad3e0993d95f2752aa61182f5188a /libavformat/matroskadec.c | |
parent | ae628ec1fd7f54c102bf9e667a3edd404b9b9128 (diff) | |
download | ffmpeg-e731b8d8729e75bfb69f5540e6446d6118dac549.tar.gz |
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>
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); |