[FFmpeg-cvslog] avio: make put_nbyte internal.

Anton Khirnov git
Tue Feb 22 03:17:17 CET 2011


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Mon Feb 21 20:02:20 2011 +0100| [2df9d0008ee34f99212f8c9820bd858ff8b64642] | committer: Michael Niedermayer

avio: make put_nbyte internal.

Signed-off-by: Ronald S. Bultje <rsbultje at gmail.com>
(cherry picked from commit 0ac8e2bf2bf3d636241bf2811018d9974687a63c)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2df9d0008ee34f99212f8c9820bd858ff8b64642
---

 libavformat/avio.h          |    2 +-
 libavformat/avio_internal.h |    2 ++
 libavformat/aviobuf.c       |    6 +++++-
 libavformat/spdifenc.c      |    2 +-
 4 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/libavformat/avio.h b/libavformat/avio.h
index f12b9f8..41fe6fb 100644
--- a/libavformat/avio.h
+++ b/libavformat/avio.h
@@ -397,6 +397,7 @@ attribute_deprecated unsigned int get_be32(AVIOContext *s);
 attribute_deprecated uint64_t     get_be64(AVIOContext *s);
 
 attribute_deprecated void         put_byte(AVIOContext *s, int b);
+attribute_deprecated void         put_nbyte(AVIOContext *s, int b, int count);
 attribute_deprecated void         put_buffer(AVIOContext *s, const unsigned char *buf, int size);
 attribute_deprecated void         put_le64(AVIOContext *s, uint64_t val);
 attribute_deprecated void         put_be64(AVIOContext *s, uint64_t val);
@@ -421,7 +422,6 @@ AVIOContext *avio_alloc_context(
                   int64_t (*seek)(void *opaque, int64_t offset, int whence));
 
 void avio_w8(AVIOContext *s, int b);
-void put_nbyte(AVIOContext *s, int b, int count);
 void avio_write(AVIOContext *s, const unsigned char *buf, int size);
 void avio_wl64(AVIOContext *s, uint64_t val);
 void avio_wb64(AVIOContext *s, uint64_t val);
diff --git a/libavformat/avio_internal.h b/libavformat/avio_internal.h
index 1671537..85e7f06 100644
--- a/libavformat/avio_internal.h
+++ b/libavformat/avio_internal.h
@@ -40,4 +40,6 @@ int ffio_init_context(AVIOContext *s,
  */
 int ffio_read_partial(AVIOContext *s, unsigned char *buf, int size);
 
+void ffio_fill(AVIOContext *s, int b, int count);
+
 #endif // AVFORMAT_AVIO_INTERNAL_H
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index 275794d..eb48758 100644
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -141,7 +141,7 @@ void avio_w8(AVIOContext *s, int b)
         flush_buffer(s);
 }
 
-void put_nbyte(AVIOContext *s, int b, int count)
+void ffio_fill(AVIOContext *s, int b, int count)
 {
     while (count > 0) {
         int len = FFMIN(s->buf_end - s->buf_ptr, count);
@@ -352,6 +352,10 @@ void put_buffer(AVIOContext *s, const unsigned char *buf, int size)
 {
     avio_write(s, buf, size);
 }
+void put_nbyte(AVIOContext *s, int b, int count)
+{
+    ffio_fill(s, b, count);
+}
 #endif
 
 int avio_put_str(AVIOContext *s, const char *str)
diff --git a/libavformat/spdifenc.c b/libavformat/spdifenc.c
index 8c0ee70..90ac8ad 100644
--- a/libavformat/spdifenc.c
+++ b/libavformat/spdifenc.c
@@ -525,7 +525,7 @@ static int spdif_write_packet(struct AVFormatContext *s, AVPacket *pkt)
     if (ctx->out_bytes & 1)
         spdif_put_16(ctx, s->pb, ctx->out_buf[ctx->out_bytes - 1] << 8);
 
-    put_nbyte(s->pb, 0, padding);
+    ffio_fill(s->pb, 0, padding);
 
     av_log(s, AV_LOG_DEBUG, "type=%x len=%i pkt_offset=%i\n",
            ctx->data_type, ctx->out_bytes, ctx->pkt_offset);




More information about the ffmpeg-cvslog mailing list