Commit d22c7015 authored by bcoudurier's avatar bcoudurier

always write required version string local tag

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@15059 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 9a0751e1
...@@ -338,6 +338,7 @@ static void mxf_write_local_tag_utf16(ByteIOContext *pb, int tag, const char *va ...@@ -338,6 +338,7 @@ static void mxf_write_local_tag_utf16(ByteIOContext *pb, int tag, const char *va
static void mxf_write_identification(AVFormatContext *s) static void mxf_write_identification(AVFormatContext *s)
{ {
ByteIOContext *pb = s->pb; ByteIOContext *pb = s->pb;
const char *version;
int length, company_name_len, product_name_len, version_string_len; int length, company_name_len, product_name_len, version_string_len;
mxf_write_metadata_key(pb, 0x013000); mxf_write_metadata_key(pb, 0x013000);
...@@ -347,9 +348,11 @@ static void mxf_write_identification(AVFormatContext *s) ...@@ -347,9 +348,11 @@ static void mxf_write_identification(AVFormatContext *s)
length = 80 + company_name_len + product_name_len; length = 80 + company_name_len + product_name_len;
if (!(s->streams[0]->codec->flags & CODEC_FLAG_BITEXACT)) { if (!(s->streams[0]->codec->flags & CODEC_FLAG_BITEXACT)) {
version_string_len = strlen(LIBAVFORMAT_IDENT) * 2; version = LIBAVFORMAT_IDENT;
length += 4 + version_string_len; } else {
version = "0.0.0";
} }
length += 4 + strlen(version)*2;
klv_encode_ber_length(pb, length); klv_encode_ber_length(pb, length);
// write uid // write uid
...@@ -362,8 +365,7 @@ static void mxf_write_identification(AVFormatContext *s) ...@@ -362,8 +365,7 @@ static void mxf_write_identification(AVFormatContext *s)
mxf_write_local_tag_utf16(pb, 0x3C01, "FFmpeg"); // Company Name mxf_write_local_tag_utf16(pb, 0x3C01, "FFmpeg"); // Company Name
mxf_write_local_tag_utf16(pb, 0x3C02, "OP1a Muxer"); // Product 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, version); // Version String
mxf_write_local_tag_utf16(pb, 0x3C04, LIBAVFORMAT_IDENT); // Version String
// write product uid // write product uid
mxf_write_local_tag(pb, 16, 0x3C05); mxf_write_local_tag(pb, 16, 0x3C05);
......
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