diff options
author | Anton Khirnov <anton@khirnov.net> | 2011-02-21 21:28:17 +0300 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-02-22 04:44:38 +0300 |
commit | e9eb8d0bcecd656292856698f603a841a82cc9c6 (patch) | |
tree | 4b601393c2f41791e8db8ea2fe4ad2a1dbae3937 /libavformat/img2.c | |
parent | e48fe14a54d8360336dbb22f3f787815b57dda47 (diff) |
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>
(cherry picked from commit 77eb5504d3b3e1047900382350e0bc5e0bfb16b5)
Diffstat (limited to 'libavformat/img2.c')
-rw-r--r-- | libavformat/img2.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/libavformat/img2.c b/libavformat/img2.c index f2d40d16de..56c4850efe 100644 --- a/libavformat/img2.c +++ b/libavformat/img2.c @@ -368,9 +368,9 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt) if(codec->codec_id == CODEC_ID_RAWVIDEO){ int ysize = codec->width * codec->height; - put_buffer(pb[0], pkt->data , ysize); - put_buffer(pb[1], pkt->data + ysize, (pkt->size - ysize)/2); - put_buffer(pb[2], pkt->data + ysize +(pkt->size - ysize)/2, (pkt->size - ysize)/2); + avio_write(pb[0], pkt->data , ysize); + avio_write(pb[1], pkt->data + ysize, (pkt->size - ysize)/2); + avio_write(pb[2], pkt->data + ysize +(pkt->size - ysize)/2, (pkt->size - ysize)/2); put_flush_packet(pb[1]); put_flush_packet(pb[2]); url_fclose(pb[1]); @@ -382,15 +382,15 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt) AV_RL32(st->codec->extradata+4) == MKTAG('j','p','2','h')){ if(pkt->size < 8 || AV_RL32(pkt->data+4) != MKTAG('j','p','2','c')) goto error; - put_be32(pb[0], 12); + avio_wb32(pb[0], 12); put_tag (pb[0], "jP "); - put_be32(pb[0], 0x0D0A870A); // signature - put_be32(pb[0], 20); + avio_wb32(pb[0], 0x0D0A870A); // signature + avio_wb32(pb[0], 20); put_tag (pb[0], "ftyp"); put_tag (pb[0], "jp2 "); - put_be32(pb[0], 0); + avio_wb32(pb[0], 0); put_tag (pb[0], "jp2 "); - put_buffer(pb[0], st->codec->extradata, st->codec->extradata_size); + avio_write(pb[0], st->codec->extradata, st->codec->extradata_size); }else if(pkt->size < 8 || (!st->codec->extradata_size && AV_RL32(pkt->data+4) != MKTAG('j','P',' ',' '))){ // signature @@ -399,7 +399,7 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt) return -1; } } - put_buffer(pb[0], pkt->data, pkt->size); + avio_write(pb[0], pkt->data, pkt->size); } put_flush_packet(pb[0]); if (!img->is_pipe) { |