Mercurial > libavformat.hg
changeset 3807:24113c3ebeaf libavformat
always write required version string local tag
author | bcoudurier |
---|---|
date | Sat, 30 Aug 2008 22:37:19 +0000 |
parents | fa043e93fc66 |
children | dd88c58a4432 |
files | mxfenc.c |
diffstat | 1 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mxfenc.c Sat Aug 30 22:32:23 2008 +0000 +++ b/mxfenc.c Sat Aug 30 22:37:19 2008 +0000 @@ -338,6 +338,7 @@ static void mxf_write_identification(AVFormatContext *s) { ByteIOContext *pb = s->pb; + const char *version; int length, company_name_len, product_name_len, version_string_len; mxf_write_metadata_key(pb, 0x013000); @@ -347,9 +348,11 @@ length = 80 + company_name_len + product_name_len; if (!(s->streams[0]->codec->flags & CODEC_FLAG_BITEXACT)) { - version_string_len = strlen(LIBAVFORMAT_IDENT) * 2; - length += 4 + version_string_len; + version = LIBAVFORMAT_IDENT; + } else { + version = "0.0.0"; } + length += 4 + strlen(version)*2; klv_encode_ber_length(pb, length); // write uid @@ -362,8 +365,7 @@ mxf_write_local_tag_utf16(pb, 0x3C01, "FFmpeg"); // Company Name mxf_write_local_tag_utf16(pb, 0x3C02, "OP1a Muxer"); // Product Name - if (!(s->streams[0]->codec->flags & CODEC_FLAG_BITEXACT)) - mxf_write_local_tag_utf16(pb, 0x3C04, LIBAVFORMAT_IDENT); // Version String + mxf_write_local_tag_utf16(pb, 0x3C04, version); // Version String // write product uid mxf_write_local_tag(pb, 16, 0x3C05);