]> git.sesse.net Git - ffmpeg/commitdiff
avio: rename av_alloc_put_byte -> avio_alloc_context for consistency
authorAnton Khirnov <anton@khirnov.net>
Sun, 20 Feb 2011 14:03:29 +0000 (15:03 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 22 Feb 2011 01:44:36 +0000 (02:44 +0100)
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 8d9ac969cb4ac3e3e18f6425703af4d7aec6c513)

libavformat/avidec.c
libavformat/avio.h
libavformat/aviobuf.c
libavformat/rdt.c
libavformat/wtv.c

index c83d840189cd90cc3865e9e085b600c393d7d9d8..7eda500422f49d1afb5bc634cc8c79fb7ecc9152 100644 (file)
@@ -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;
index 060f06e6f2dfc570d3bc9df2f9be3dea9381d78d..4fb701696e1a345c795243fa72ccd6052544806b 100644 (file)
@@ -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,
index 7b1f5ca1fdb8fbdacbf9c28fb3604462c0071727..c3d69a185ed2757f4434149860bd5f7359f43bf0 100644 (file)
@@ -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,
index bbc3de923b797184b7431f09cc5627f74592d9df..d846533724582710b10a838a29bfe9d02a9e8bfd 100644 (file)
@@ -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;
index bdccdb3b09f86ca54897ef18670453b78d2af45e..e8b6268db331909caa60b87dc888e6ccbda4dffd 100644 (file)
@@ -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);