Commit 6b05863a authored by Baptiste Coudurier's avatar Baptiste Coudurier
Browse files

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

Originally committed as revision 15057 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 5f94b920
......@@ -329,7 +329,7 @@ static void mxf_write_preface(AVFormatContext *s)
*/
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(AVFormatContext *s)
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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment