[FFmpeg-devel] [PATCH 2/2] avformat/mxf: support MCA audio information

Tomas Härdin tjoppen at acc.umu.se
Thu Sep 16 12:57:58 EEST 2021


ons 2021-09-15 klockan 12:14 +0200 skrev Marc-Antoine Arnaud:

+static int mxf_read_mca_sub_descriptor(void *arg, AVIOContext *pb, int
tag, int size, UID uid, int64_t klv_offset)
+{
+    MXFMCASubDescriptor *mca_sub_descriptor = arg;
+
+    if (IS_KLV_KEY(uid, mxf_mca_prefix)) {
+        if (IS_KLV_KEY(uid, mxf_mca_label_dictionnary_id)) {
+            avio_read(pb, mca_sub_descriptor-
>mca_label_dictionnary_id, 16);
+        }
+        if (IS_KLV_KEY(uid, mxf_mca_link_id)) {
+            avio_read(pb, mca_sub_descriptor->mca_link_id, 16);
+        }
+        if (IS_KLV_KEY(uid, mxf_soundfield_group_link_id)) {
+            avio_read(pb, mca_sub_descriptor->mca_group_link_id, 16);
+        }
+    }

This nesting of ifs is unnecessary

Rest of the patch looks fine. Passes FATE. Do you have a sample or two?

/Tomas



More information about the ffmpeg-devel mailing list