aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2011-02-20 15:03:29 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-02-22 02:44:36 +0100
commit90ed2776ea7368f1b6cf07af5f29fd06efbfcd65 (patch)
tree29ba6321e5d9705f2b2b74c9cfe0755fb7a0fe58 /libavformat
parent34bb0575c164dcbe945add0f314d1c1889f9d23e (diff)
downloadffmpeg-90ed2776ea7368f1b6cf07af5f29fd06efbfcd65.tar.gz
avio: rename av_alloc_put_byte -> avio_alloc_context for consistency
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com> (cherry picked from commit 8d9ac969cb4ac3e3e18f6425703af4d7aec6c513)
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/avidec.c2
-rw-r--r--libavformat/avio.h11
-rw-r--r--libavformat/aviobuf.c14
-rw-r--r--libavformat/rdt.c2
-rw-r--r--libavformat/wtv.c2
5 files changed, 26 insertions, 5 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index c83d840189..7eda500422 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -752,7 +752,7 @@ static int read_gab2_sub(AVStream *st, AVPacket *pkt) {
AVIStream *ast = st->priv_data;
AVInputFormat *sub_demuxer;
AVRational time_base;
- AVIOContext *pb = av_alloc_put_byte(pkt->data + 7,
+ AVIOContext *pb = avio_alloc_context( pkt->data + 7,
pkt->size - 7,
0, NULL, NULL, NULL, NULL);
AVProbeData pd;
diff --git a/libavformat/avio.h b/libavformat/avio.h
index 060f06e6f2..4fb701696e 100644
--- a/libavformat/avio.h
+++ b/libavformat/avio.h
@@ -370,8 +370,17 @@ attribute_deprecated int init_put_byte(AVIOContext *s,
int (*read_packet)(void *opaque, uint8_t *buf, int buf_size),
int (*write_packet)(void *opaque, uint8_t *buf, int buf_size),
int64_t (*seek)(void *opaque, int64_t offset, int whence));
+attribute_deprecated AVIOContext *av_alloc_put_byte(
+ unsigned char *buffer,
+ int buffer_size,
+ int write_flag,
+ void *opaque,
+ int (*read_packet)(void *opaque, uint8_t *buf, int buf_size),
+ int (*write_packet)(void *opaque, uint8_t *buf, int buf_size),
+ int64_t (*seek)(void *opaque, int64_t offset, int whence));
#endif
-AVIOContext *av_alloc_put_byte(
+
+AVIOContext *avio_alloc_context(
unsigned char *buffer,
int buffer_size,
int write_flag,
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index 7b1f5ca1fd..c3d69a185e 100644
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -87,9 +87,21 @@ int init_put_byte(AVIOContext *s,
return ffio_init_context(s, buffer, buffer_size, write_flag, opaque,
read_packet, write_packet, seek);
}
+AVIOContext *av_alloc_put_byte(
+ unsigned char *buffer,
+ int buffer_size,
+ int write_flag,
+ void *opaque,
+ int (*read_packet)(void *opaque, uint8_t *buf, int buf_size),
+ int (*write_packet)(void *opaque, uint8_t *buf, int buf_size),
+ int64_t (*seek)(void *opaque, int64_t offset, int whence))
+{
+ return avio_alloc_context(buffer, buffer_size, write_flag, opaque,
+ read_packet, write_packet, seek);
+}
#endif
-AVIOContext *av_alloc_put_byte(
+AVIOContext *avio_alloc_context(
unsigned char *buffer,
int buffer_size,
int write_flag,
diff --git a/libavformat/rdt.c b/libavformat/rdt.c
index bbc3de923b..d846533724 100644
--- a/libavformat/rdt.c
+++ b/libavformat/rdt.c
@@ -311,7 +311,7 @@ rdt_parse_packet (AVFormatContext *ctx, PayloadContext *rdt, AVStream *st,
if (res > 0) {
if (st->codec->codec_id == CODEC_ID_AAC) {
memcpy (rdt->buffer, buf + pos, len - pos);
- rdt->rmctx->pb = av_alloc_put_byte (rdt->buffer, len - pos, 0,
+ rdt->rmctx->pb = avio_alloc_context (rdt->buffer, len - pos, 0,
NULL, NULL, NULL, NULL);
}
goto get_cache;
diff --git a/libavformat/wtv.c b/libavformat/wtv.c
index bdccdb3b09..e8b6268db3 100644
--- a/libavformat/wtv.c
+++ b/libavformat/wtv.c
@@ -236,7 +236,7 @@ static AVIOContext * wtvfile_open_sector(int first_sector, uint64_t length, int
return NULL;
}
- pb = av_alloc_put_byte(buffer, 1 << wf->sector_bits, 0, wf,
+ pb = avio_alloc_context(buffer, 1 << wf->sector_bits, 0, wf,
wtvfile_read_packet, NULL, wtvfile_seek);
if (!pb) {
av_free(buffer);