movenc: Write tfdt atoms

These allow getting the absolute start timestamp of a fragment
without reading preceding timestamps. This fixes sync between
tracks if starting from fragments in different streams that don't
align exactly.

This also is a prerequisite for producing DASH content.

Signed-off-by: Martin Storsjö <martin@martin.st>
mov: Handle tfdt atoms

Signed-off-by: Martin Storsjö <martin@martin.st>
Merge commit 'c2c22c75cf89e2faab34d1ee1d392cfb065439ea'

* commit 'c2c22c75cf89e2faab34d1ee1d392cfb065439ea':
  movenc: Write tfdt atoms

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit 'a74f8121d88e0bdf0d69c22e4b3713032da9300a'

* commit 'a74f8121d88e0bdf0d69c22e4b3713032da9300a':
  mov: Handle tfdt atoms

Merged-by: Michael Niedermayer <michaelni@gmx.at>
avformat/mxfdec: Fix termination of mxf_data_essence_container_uls

Fixes: asan_static-oob_87d116_10_201.mxf
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/mxfdec: Fix memleak of primer_packs

Fixes: asan_static-oob_87d116_10_201.mxf
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/mxfdec: Fix memleak of packages_refs

Fixes: asan_static-oob_87d116_10_201.mxf
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/mxfdec: cleanup if parsing the header metadata fails

Fixes memleaks
Fixes: asan_static-oob_87d116_10_201.mxf
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>