diff options
author | Anton Khirnov <anton@khirnov.net> | 2011-02-21 20:02:20 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-02-22 02:44:38 +0100 |
commit | 2df9d0008ee34f99212f8c9820bd858ff8b64642 (patch) | |
tree | 5cc663e6bafeb85495f5c34473bf8e7f2fafcf76 | |
parent | e9eb8d0bcecd656292856698f603a841a82cc9c6 (diff) | |
download | ffmpeg-2df9d0008ee34f99212f8c9820bd858ff8b64642.tar.gz |
avio: make put_nbyte internal.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 0ac8e2bf2bf3d636241bf2811018d9974687a63c)
-rw-r--r-- | libavformat/avio.h | 2 | ||||
-rw-r--r-- | libavformat/avio_internal.h | 2 | ||||
-rw-r--r-- | libavformat/aviobuf.c | 6 | ||||
-rw-r--r-- | libavformat/spdifenc.c | 2 |
4 files changed, 9 insertions, 3 deletions
diff --git a/libavformat/avio.h b/libavformat/avio.h index f12b9f8127..41fe6fbeca 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 16715377b5..85e7f069e2 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 275794deb9..eb48758c46 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 8c0ee70e2c..90ac8adc9f 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); |