[FFmpeg-soc] [soc]: r2900 - mxf/mxfenc.c

spyfeng subversion at mplayerhq.hu
Tue Jul 29 18:28:24 CEST 2008


Author: spyfeng
Date: Tue Jul 29 18:28:24 2008
New Revision: 2900

Log:
remove utf8len() and use strlen() instead.


Modified:
   mxf/mxfenc.c

Modified: mxf/mxfenc.c
==============================================================================
--- mxf/mxfenc.c	(original)
+++ mxf/mxfenc.c	Tue Jul 29 18:28:24 2008
@@ -333,16 +333,6 @@ static void mxf_write_reference(ByteIOCo
     put_buffer(pb, *value, 16 * ref_count);
 }
 
-static int utf8len(const uint8_t *b){
-    int len=0;
-    int val;
-    while(*b){
-        GET_UTF8(val, *b++, return -1;)
-        len++;
-    }
-    return len;
-}
-
 static void mxf_free(AVFormatContext *s)
 {
     MXFContext *mxf = s->priv_data;
@@ -450,9 +440,9 @@ static int mxf_write_identification(AVFo
 
     put_buffer(pb, klv->key, 16);
 
-    company_name_len = utf8len("FFmpeg") + 1;
-    product_name_len = utf8len("OP1a Muxer") + 1;
-    version_string_len = utf8len(LIBAVFORMAT_IDENT) + 1;
+    company_name_len = strlen("FFmpeg") + 1;
+    product_name_len = strlen("OP1a Muxer") + 1;
+    version_string_len = strlen(LIBAVFORMAT_IDENT) + 1;
     length = 84 + company_name_len + product_name_len + version_string_len;
 
     klv_encode_ber_length(pb, length);
@@ -476,7 +466,7 @@ static int mxf_write_identification(AVFo
     put_buffer(pb, "OP1a Muxer", product_name_len);
 
     mxf_write_local_tag(pb, version_string_len, 0x3C04);
-    put_buffer(pb, "version 0.0.1", version_string_len);
+    put_buffer(pb, "LIBAVFORMAT_IDENT", version_string_len);
 
     // write product uid
     mxf_generate_uuid(s, uid);



More information about the FFmpeg-soc mailing list