summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorLimin Wang <lance.lmwang@gmail.com>2021-02-02 07:17:44 +0800
committerLimin Wang <lance.lmwang@gmail.com>2021-02-05 09:27:06 +0800
commit9605307e7854ac4941ae4e7400b997612fa6712c (patch)
treebac41f41044026f1ede65e83e86c949b477b1d11 /libavformat
parent3f8db7eea0bc22148f0e27906d85975708b842ea (diff)
avformat/mxf: add platform local tag
Please check the string of platform with below command: ./ffmpeg -i ../fate-suite/mxf/Sony-00001.mxf -c:v copy -c:a copy out.mxf ./ffmpeg -i out.mxf .... application_platform: Lavf (linux) Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/mxfenc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c
index b0cfa87824..39ab443a04 100644
--- a/libavformat/mxfenc.c
+++ b/libavformat/mxfenc.c
@@ -752,12 +752,14 @@ static void store_version(AVFormatContext *s){
avio_wb16(pb, 0); // release
}
+#define PLATFROM_IDENT "Lavf " AV_STRINGIFY((OS_NAME))
static void mxf_write_identification(AVFormatContext *s)
{
MXFContext *mxf = s->priv_data;
AVIOContext *pb = s->pb;
const char *company = "FFmpeg";
const char *product = s->oformat != &ff_mxf_opatom_muxer ? "OP1a Muxer" : "OPAtom Muxer";
+ const char *platform = s->flags & AVFMT_FLAG_BITEXACT ? "Lavf" : PLATFROM_IDENT;
const char *version;
int length;
@@ -768,6 +770,7 @@ static void mxf_write_identification(AVFormatContext *s)
"0.0.0" : AV_STRINGIFY(LIBAVFORMAT_VERSION);
length = 100 +mxf_utf16_local_tag_length(company) +
mxf_utf16_local_tag_length(product) +
+ mxf_utf16_local_tag_length(platform) +
mxf_utf16_local_tag_length(version);
klv_encode_ber_length(pb, length);
@@ -786,6 +789,7 @@ static void mxf_write_identification(AVFormatContext *s)
store_version(s);
mxf_write_local_tag_utf16(s, 0x3C04, version); // Version String
+ mxf_write_local_tag_utf16(s, 0x3C08, platform); // Platform
// write product uid
mxf_write_local_tag(s, 16, 0x3C05);