[FFmpeg-devel] [PATCH] avformat/mxfdec: make MXFMetadataSet part of all metadata sets

Tomas Härdin tjoppen at acc.umu.se
Mon Aug 2 14:37:49 EEST 2021


sön 2021-08-01 klockan 03:55 +0200 skrev Marton Balint:
> The code expects every kind of metadata set to start with the generic metadata
> set attributes.
> 
> Signed-off-by: Marton Balint <cus at passwd.hu>
> ---
>  libavformat/mxfdec.c | 66 ++++++++++++++------------------------------
>  1 file changed, 21 insertions(+), 45 deletions(-)
> 
> diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
> index fd22680adb..34cbd2cd77 100644
> --- a/libavformat/mxfdec.c
> +++ b/libavformat/mxfdec.c
> @@ -106,17 +106,19 @@ typedef struct MXFPartition {
>      KLVPacket first_essence_klv;
>  } MXFPartition;
>  
> -typedef struct MXFCryptoContext {
> +typedef struct MXFMetadataSet {
>      UID uid;
>      MXFPartition *partition;
>      enum MXFMetadataSetType type;
> +} MXFMetadataSet;
> +
> +typedef struct MXFCryptoContext {
> +    MXFMetadataSet meta;
>      UID source_container_ul;
>  } MXFCryptoContext;
>  

This is something I've had in mind as well, but never got around to. I
approve! This also makes the code more strict-aliasing correct

/Tomas



More information about the ffmpeg-devel mailing list