diff options
author | Anton Khirnov <anton@khirnov.net> | 2012-02-27 21:48:37 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2012-02-29 14:25:33 +0100 |
commit | c19981774880919c7f9417014bdcb1fb63f69231 (patch) | |
tree | be771c083b8276232c23bd9c4213d3ed99524270 /libavformat/id3v2enc.c | |
parent | 393fd0d89e6d0a1cf5bd39f309f6f10e0f1f8ac7 (diff) | |
download | ffmpeg-c19981774880919c7f9417014bdcb1fb63f69231.tar.gz |
id3v2enc: make id3v2_put_size take only an AVIOContext.
It has no need of full AVFormatContext.
Diffstat (limited to 'libavformat/id3v2enc.c')
-rw-r--r-- | libavformat/id3v2enc.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libavformat/id3v2enc.c b/libavformat/id3v2enc.c index 36c73bfecb..3a4d229232 100644 --- a/libavformat/id3v2enc.c +++ b/libavformat/id3v2enc.c @@ -26,12 +26,12 @@ #include "avio.h" #include "id3v2.h" -static void id3v2_put_size(AVFormatContext *s, int size) +static void id3v2_put_size(AVIOContext *pb, int size) { - avio_w8(s->pb, size >> 21 & 0x7f); - avio_w8(s->pb, size >> 14 & 0x7f); - avio_w8(s->pb, size >> 7 & 0x7f); - avio_w8(s->pb, size & 0x7f); + avio_w8(pb, size >> 21 & 0x7f); + avio_w8(pb, size >> 14 & 0x7f); + avio_w8(pb, size >> 7 & 0x7f); + avio_w8(pb, size & 0x7f); } static int string_is_ascii(const uint8_t *str) @@ -74,7 +74,7 @@ static int id3v2_put_ttag(AVFormatContext *s, const char *str1, const char *str2 len = avio_close_dyn_buf(dyn_buf, &pb); avio_wb32(s->pb, tag); - id3v2_put_size(s, len); + id3v2_put_size(s->pb, len); avio_wb16(s->pb, 0); avio_write(s->pb, pb, len); @@ -140,7 +140,7 @@ int ff_id3v2_write(struct AVFormatContext *s, int id3v2_version, cur_pos = avio_tell(s->pb); avio_seek(s->pb, size_pos, SEEK_SET); - id3v2_put_size(s, totlen); + id3v2_put_size(s->pb, totlen); avio_seek(s->pb, cur_pos, SEEK_SET); return 0; } |