aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2008-06-11 09:35:02 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2008-06-11 09:35:02 +0000
commit07b7b06d92bb5039a3c5feb4f4ee472ebbf41cee (patch)
tree98452bcedf7e8b4af690ea72841314714b13d93a /libavformat
parentc55cc074cc4ac52995836910e5deeadd48a54e91 (diff)
downloadffmpeg-07b7b06d92bb5039a3c5feb4f4ee472ebbf41cee.tar.gz
move utf8 code before udta func, will be used by 3gp tags
Originally committed as revision 13745 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/movenc.c54
1 files changed, 27 insertions, 27 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 5ddcd5be8b..5a4a14151b 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -1189,6 +1189,33 @@ static int mov_write_meta_tag(ByteIOContext *pb, MOVContext *mov,
return size;
}
+static int utf8len(const uint8_t *b)
+{
+ int len=0;
+ int val;
+ while(*b){
+ GET_UTF8(val, *b++, return -1;)
+ len++;
+ }
+ return len;
+}
+
+static int ascii_to_wc(ByteIOContext *pb, const uint8_t *b)
+{
+ int val;
+ while(*b){
+ GET_UTF8(val, *b++, return -1;)
+ put_be16(pb, val);
+ }
+ put_be16(pb, 0x00);
+ return 0;
+}
+
+static uint16_t language_code(const char *str)
+{
+ return (((str[0]-0x60) & 0x1F) << 10) + (((str[1]-0x60) & 0x1F) << 5) + ((str[2]-0x60) & 0x1F);
+}
+
static int mov_write_udta_tag(ByteIOContext *pb, MOVContext *mov,
AVFormatContext *s)
{
@@ -1227,33 +1254,6 @@ static int mov_write_udta_tag(ByteIOContext *pb, MOVContext *mov,
return 0;
}
-static int utf8len(const uint8_t *b)
-{
- int len=0;
- int val;
- while(*b){
- GET_UTF8(val, *b++, return -1;)
- len++;
- }
- return len;
-}
-
-static int ascii_to_wc(ByteIOContext *pb, const uint8_t *b)
-{
- int val;
- while(*b){
- GET_UTF8(val, *b++, return -1;)
- put_be16(pb, val);
- }
- put_be16(pb, 0x00);
- return 0;
-}
-
-static uint16_t language_code(const char *str)
-{
- return (((str[0]-0x60) & 0x1F) << 10) + (((str[1]-0x60) & 0x1F) << 5) + ((str[2]-0x60) & 0x1F);
-}
-
static void mov_write_psp_udta_tag(ByteIOContext *pb,
const char *str, const char *lang, int type)
{