diff mbox series

[FFmpeg-devel,1/2] avformat/mxfdec: move resolving Descriptors to the multi descriptor resolve function

Message ID 20240216211804.4546-1-cus@passwd.hu
State Accepted
Commit 41672f558673151e77798f8a184fc1d3e60b16b9
Headers show
Series [FFmpeg-devel,1/2] avformat/mxfdec: move resolving Descriptors to the multi descriptor resolve function | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Marton Balint Feb. 16, 2024, 9:18 p.m. UTC
Also remove unused descriptor member from MXFPackage.

Signed-off-by: Marton Balint <cus@passwd.hu>
---
 libavformat/mxfdec.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

Comments

Tomas Härdin Feb. 19, 2024, 11:08 a.m. UTC | #1
fre 2024-02-16 klockan 22:18 +0100 skrev Marton Balint:
> Also remove unused descriptor member from MXFPackage.
> 
> Signed-off-by: Marton Balint <cus@passwd.hu>
> ---
>  libavformat/mxfdec.c | 9 ++++-----
>  1 file changed, 4 insertions(+), 5 deletions(-)

Looks OK

/Tomas
diff mbox series

Patch

diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index e42975e7fd..4e4e3e7a84 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -266,7 +266,6 @@  typedef struct MXFPackage {
     UID package_ul;
     UID *tracks_refs;
     int tracks_count;
-    MXFDescriptor *descriptor; /* only one */
     UID descriptor_ref;
     char *name;
     UID *comment_refs;
@@ -2257,11 +2256,12 @@  static MXFPackage* mxf_resolve_source_package(MXFContext *mxf, UID package_ul, U
     return NULL;
 }
 
-static MXFDescriptor* mxf_resolve_multidescriptor(MXFContext *mxf, MXFDescriptor *descriptor, int track_id)
+static MXFDescriptor* mxf_resolve_descriptor(MXFContext *mxf, UID *strong_ref, int track_id)
 {
-    MXFDescriptor *file_descriptor = NULL;
+    MXFDescriptor *descriptor, *file_descriptor = NULL;
     int i;
 
+    descriptor = mxf_resolve_strong_ref(mxf, strong_ref, AnyType);
     if (!descriptor)
         return NULL;
 
@@ -2782,8 +2782,7 @@  static int mxf_parse_structural_metadata(MXFContext *mxf)
         st->id = material_track->track_id;
         st->priv_data = source_track;
 
-        source_package->descriptor = mxf_resolve_strong_ref(mxf, &source_package->descriptor_ref, AnyType);
-        descriptor = mxf_resolve_multidescriptor(mxf, source_package->descriptor, source_track->track_id);
+        descriptor = mxf_resolve_descriptor(mxf, &source_package->descriptor_ref, source_track->track_id);
 
         /* A SourceClip from a EssenceGroup may only be a single frame of essence data. The clips duration is then how many
          * frames its suppose to repeat for. Descriptor->duration, if present, contains the real duration of the essence data */