diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2008-08-30 22:24:19 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2008-08-30 22:24:19 +0000 |
commit | 6b05863aa986f5c0dcee6096a92ac0c4ff81e406 (patch) | |
tree | 88ee9c0dab8ce800847b9e79069435a8f036a5f7 /libavformat/mxfenc.c | |
parent | 5f94b92077ca2182ef013762650b3896f57b548a (diff) | |
download | ffmpeg-6b05863aa986f5c0dcee6096a92ac0c4ff81e406.tar.gz |
use strlen and do not write useless trailing 0 according to specs
Originally committed as revision 15057 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/mxfenc.c')
-rw-r--r-- | libavformat/mxfenc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c index 81a2437189..013634da5d 100644 --- a/libavformat/mxfenc.c +++ b/libavformat/mxfenc.c @@ -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); |