summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorRichard Ayres <Richard.Ayres@bydeluxe.com>2022-10-03 11:47:12 +0000
committerTomas Härdin <git@haerdin.se>2022-10-06 10:04:17 +0200
commitb074424bf6f8501e805b1b56ed31d8e3cf50faed (patch)
treeaf070ca3522cd179e013166463d3d117921a0cef /libavformat
parent451b310d4f0ba5a38c3f67ec2ce39bcb62fcf59b (diff)
Encrypted SMPTE DC MXF - additional UL needed to unpack EKLV packet
Thanks, Pierre-Anthony. I've updated the patch to remove the unnecessary UL and it's now using mxf_match_uid() to detect the EKLV packet. Signed-off-by: Richard Ayres <richard.ayres@bydeluxe.com>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/mxfdec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index badd2be224..b1ab90f25f 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -3737,7 +3737,7 @@ static int mxf_read_header(AVFormatContext *s)
PRINT_KEY(s, "read header", klv.key);
av_log(s, AV_LOG_TRACE, "size %"PRIu64" offset %#"PRIx64"\n", klv.length, klv.offset);
- if (IS_KLV_KEY(klv.key, mxf_encrypted_triplet_key) ||
+ if (mxf_match_uid(klv.key, mxf_encrypted_triplet_key, sizeof(mxf_encrypted_triplet_key)) ||
IS_KLV_KEY(klv.key, mxf_essence_element_key) ||
IS_KLV_KEY(klv.key, mxf_canopus_essence_element_key) ||
IS_KLV_KEY(klv.key, mxf_avid_essence_element_key) ||
@@ -3983,7 +3983,7 @@ static int mxf_read_packet(AVFormatContext *s, AVPacket *pkt)
pos = klv.next_klv - klv.length;
PRINT_KEY(s, "read packet", klv.key);
av_log(s, AV_LOG_TRACE, "size %"PRIu64" offset %#"PRIx64"\n", klv.length, klv.offset);
- if (IS_KLV_KEY(klv.key, mxf_encrypted_triplet_key)) {
+ if (mxf_match_uid(klv.key, mxf_encrypted_triplet_key, sizeof(mxf_encrypted_triplet_key))) {
ret = mxf_decrypt_triplet(s, pkt, &klv);
if (ret < 0) {
av_log(s, AV_LOG_ERROR, "invalid encoded triplet\n");