diff options
author | Anton Khirnov <anton@khirnov.net> | 2011-02-21 19:28:17 +0100 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2011-02-21 14:25:15 -0500 |
commit | 77eb5504d3b3e1047900382350e0bc5e0bfb16b5 (patch) | |
tree | adb31feb8accd7dbaaa2ce1baf48fee96664abe1 /libavformat/soxenc.c | |
parent | 78e2380a6d09e7a8b2a74d090abfb0a922e046f6 (diff) | |
download | ffmpeg-77eb5504d3b3e1047900382350e0bc5e0bfb16b5.tar.gz |
avio: avio: avio_ prefixes for put_* functions
In the name of consistency:
put_byte -> avio_w8
put_<type> -> avio_w<type>
put_buffer -> avio_write
put_nbyte will be made private
put_tag will be merged with avio_put_str
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Diffstat (limited to 'libavformat/soxenc.c')
-rw-r--r-- | libavformat/soxenc.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/libavformat/soxenc.c b/libavformat/soxenc.c index 6315efd7ef..75141de789 100644 --- a/libavformat/soxenc.c +++ b/libavformat/soxenc.c @@ -54,28 +54,28 @@ static int sox_write_header(AVFormatContext *s) if (enc->codec_id == CODEC_ID_PCM_S32LE) { put_tag(pb, ".SoX"); - put_le32(pb, sox->header_size); - put_le64(pb, 0); /* number of samples */ - put_le64(pb, av_dbl2int(enc->sample_rate)); - put_le32(pb, enc->channels); - put_le32(pb, comment_size); + avio_wl32(pb, sox->header_size); + avio_wl64(pb, 0); /* number of samples */ + avio_wl64(pb, av_dbl2int(enc->sample_rate)); + avio_wl32(pb, enc->channels); + avio_wl32(pb, comment_size); } else if (enc->codec_id == CODEC_ID_PCM_S32BE) { put_tag(pb, "XoS."); - put_be32(pb, sox->header_size); - put_be64(pb, 0); /* number of samples */ - put_be64(pb, av_dbl2int(enc->sample_rate)); - put_be32(pb, enc->channels); - put_be32(pb, comment_size); + avio_wb32(pb, sox->header_size); + avio_wb64(pb, 0); /* number of samples */ + avio_wb64(pb, av_dbl2int(enc->sample_rate)); + avio_wb32(pb, enc->channels); + avio_wb32(pb, comment_size); } else { av_log(s, AV_LOG_ERROR, "invalid codec; use pcm_s32le or pcm_s32be\n"); return -1; } if (comment_len) - put_buffer(pb, comment->value, comment_len); + avio_write(pb, comment->value, comment_len); for ( ; comment_size > comment_len; comment_len++) - put_byte(pb, 0); + avio_w8(pb, 0); put_flush_packet(pb); @@ -85,7 +85,7 @@ static int sox_write_header(AVFormatContext *s) static int sox_write_packet(AVFormatContext *s, AVPacket *pkt) { AVIOContext *pb = s->pb; - put_buffer(pb, pkt->data, pkt->size); + avio_write(pb, pkt->data, pkt->size); return 0; } @@ -101,9 +101,9 @@ static int sox_write_trailer(AVFormatContext *s) int64_t num_samples = (file_size - sox->header_size - 4LL) >> 2LL; url_fseek(pb, 8, SEEK_SET); if (enc->codec_id == CODEC_ID_PCM_S32LE) { - put_le64(pb, num_samples); + avio_wl64(pb, num_samples); } else - put_be64(pb, num_samples); + avio_wb64(pb, num_samples); url_fseek(pb, file_size, SEEK_SET); put_flush_packet(pb); |