[FFmpeg-devel] [PATCH] avformat/mxf: Establish register of local tags

Marton Balint cus at passwd.hu
Wed Jan 27 22:38:54 EET 2021



On Wed, 27 Jan 2021, Tomas Härdin wrote:

> Hi
>
> Ticket #9079 brought this about. This should prevent accidentally
> adding local tags that are not registered in the primer. It also allows
> us to omit tags that we know won't be used, in a manner that is more
> elegant than the old code.
>
> The actual meat of this patch is mxf_mark_tag_unused(),
> mxf_write_primer_pack(), mxf_write_local_tag() and
> ff_mxf_lookup_local_tag()

IMHO you should not move the local tags to mxf.c, because only encoding 
uses them.

The only exception where sharing made sense is 
ff_mxf_mastering_display_local_tags, but that is super ugly that you 
now lookup them in mxfdec.c based on local tags we assign them for 
encoding. Not to mention the linear search you use for each lookup...

So I suggest you simply duplicate the 4 UL-s to the single local tags 
array you make and keep them in mxfenc.c, that way you also don't have to 
specify the array size manually...

Regards,
Marton


More information about the ffmpeg-devel mailing list