diff options
author | Marton Balint <cus@passwd.hu> | 2022-03-14 19:13:50 +0100 |
---|---|---|
committer | Marton Balint <cus@passwd.hu> | 2022-03-16 21:37:53 +0100 |
commit | 4afe4a542e9e4c6cf2e89c7ac93da1c2936a1b3d (patch) | |
tree | 6c08454baa58138c94790f514bd23616ae288e69 /libavformat/mxfenc.c | |
parent | 2bcfe78ddf61167841e6ecb1000fe9e323389753 (diff) |
avformat/mxfenc: allow more bits for variable part in uuid generation
Also make sure we do not change the product UID.
Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'libavformat/mxfenc.c')
-rw-r--r-- | libavformat/mxfenc.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c index 5f5629f7e2..d2e25a8824 100644 --- a/libavformat/mxfenc.c +++ b/libavformat/mxfenc.c @@ -228,7 +228,8 @@ static const UID mxf_d10_container_uls[] = { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x0D,0x01,0x03,0x01,0x02,0x01,0x06,0x01 }, // D-10 525/50 NTSC 30mb/s }; -static const uint8_t uuid_base[] = { 0xAD,0xAB,0x44,0x24,0x2f,0x25,0x4d,0xc7,0x92,0xff,0x29,0xbd }; +static const uint8_t product_uid[] = { 0xAD,0xAB,0x44,0x24,0x2f,0x25,0x4d,0xc7,0x92,0xff,0x29,0xbd,0x00,0x0c,0x00,0x02}; +static const uint8_t uuid_base[] = { 0xAD,0xAB,0x44,0x24,0x2f,0x25,0x4d,0xc7,0x92,0xff }; static const uint8_t umid_ul[] = { 0x06,0x0A,0x2B,0x34,0x01,0x01,0x01,0x05,0x01,0x01,0x0D,0x00,0x13 }; /** @@ -425,9 +426,9 @@ typedef struct MXFContext { static void mxf_write_uuid(AVIOContext *pb, enum MXFMetadataSetType type, int value) { - avio_write(pb, uuid_base, 12); + avio_write(pb, uuid_base, 10); avio_wb16(pb, type); - avio_wb16(pb, value); + avio_wb32(pb, value); } static void mxf_write_umid(AVFormatContext *s, int type) @@ -798,7 +799,7 @@ static void mxf_write_identification(AVFormatContext *s) // write product uid mxf_write_local_tag(s, 16, 0x3C05); - mxf_write_uuid(pb, Identification, 2); + avio_write(pb, product_uid, 16); // modification date mxf_write_local_tag(s, 8, 0x3C06); |