[FFmpeg-cvslog] r15057 - trunk/libavformat/mxfenc.c

bcoudurier subversion
Sun Aug 31 00:24:19 CEST 2008


Author: bcoudurier
Date: Sun Aug 31 00:24:19 2008
New Revision: 15057

Log:
use strlen and do not write useless trailing 0 according to specs

Modified:
   trunk/libavformat/mxfenc.c

Modified: trunk/libavformat/mxfenc.c
==============================================================================
--- trunk/libavformat/mxfenc.c	(original)
+++ trunk/libavformat/mxfenc.c	Sun Aug 31 00:24:19 2008
@@ -329,7 +329,7 @@ static void mxf_write_preface(AVFormatCo
  */
 static void mxf_write_utf16(ByteIOContext *pb, const char *value)
 {
-    int i, size = strlen(value)+1;
+    int i, size = strlen(value);
     for (i = 0; i < size; i++)
         put_be16(pb, value[i]);
 }
@@ -341,12 +341,12 @@ static void mxf_write_identification(AVF
 
     mxf_write_metadata_key(pb, 0x013000);
     PRINT_KEY(s, "identification key", pb->buf_ptr - 16);
-    company_name_len = sizeof("FFmpeg") * 2;
-    product_name_len = sizeof("OP1a Muxer") * 2;
+    company_name_len = strlen("FFmpeg") * 2;
+    product_name_len = strlen("OP1a Muxer") * 2;
 
     length = 80 + company_name_len + product_name_len;
     if (!(s->streams[0]->codec->flags & CODEC_FLAG_BITEXACT)) {
-        version_string_len = sizeof(LIBAVFORMAT_IDENT) * 2;
+        version_string_len = strlen(LIBAVFORMAT_IDENT) * 2;
         length += 4 + version_string_len;
     }
     klv_encode_ber_length(pb, length);




More information about the ffmpeg-cvslog mailing list