diff options
author | Nicolas Gaullier <nicolas.gaullier@cji.paris> | 2021-12-14 16:27:43 +0100 |
---|---|---|
committer | Marton Balint <cus@passwd.hu> | 2021-12-27 00:39:35 +0100 |
commit | dd7c0bc4f981f7113d7bef267cc1eca8d9fb10f1 (patch) | |
tree | 7fa6753f2c273ef160662b2e87042f2e3ff6029c /libavformat | |
parent | 1cbeac0c2f7e15add5fed0a306f63a87b330c0a1 (diff) | |
download | ffmpeg-dd7c0bc4f981f7113d7bef267cc1eca8d9fb10f1.tar.gz |
avformat/mxfenc: fix DNxHD GC element_type
The values for the essence element type were updated in the spec
from 0x05/0x06 (ST2019-4 2008) to 0x0C/0x0D (ST2019-4 2009).
Fixes ticket #6380.
Thanks-to: Philip de Nier <philip.denier@bbc.co.uk>
Thanks-to: Matthieu Bouron <matthieu.bouron@gmail.com>
Reviewed-by: Matthieu Bouron <matthieu.bouron@gmail.com>
Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Nicolas Gaullier <nicolas.gaullier@cji.paris>
Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/mxfenc.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c index ec0ea7ee70..873d64a5fd 100644 --- a/libavformat/mxfenc.c +++ b/libavformat/mxfenc.c @@ -32,6 +32,7 @@ * SMPTE 379M MXF Generic Container * SMPTE 381M Mapping MPEG Streams into the MXF Generic Container * SMPTE 422M Mapping JPEG 2000 Codestreams into the MXF Generic Container + * SMPTE ST2019-4 (2009 or later) Mapping VC-3 Coding Units into the MXF Generic Container * SMPTE RP210: SMPTE Metadata Dictionary * SMPTE RP224: Registry of SMPTE Universal Labels */ @@ -181,7 +182,7 @@ static const MXFContainerEssenceEntry mxf_essence_container_uls[] = { mxf_write_cdci_desc }, // DNxHD { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x0A,0x0D,0x01,0x03,0x01,0x02,0x11,0x01,0x00 }, - { 0x06,0x0E,0x2B,0x34,0x01,0x02,0x01,0x01,0x0D,0x01,0x03,0x01,0x15,0x01,0x05,0x00 }, + { 0x06,0x0E,0x2B,0x34,0x01,0x02,0x01,0x01,0x0D,0x01,0x03,0x01,0x15,0x01,0x0C,0x00 }, { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x0A,0x04,0x01,0x02,0x02,0x71,0x01,0x00,0x00 }, mxf_write_cdci_desc }, // JPEG2000 @@ -2674,6 +2675,12 @@ static int mxf_init(AVFormatContext *s) memcpy(sc->track_essence_element_key, mxf_essence_container_uls[sc->index].element_ul, 15); sc->track_essence_element_key[15] = present[sc->index]; + if (s->oformat == &ff_mxf_opatom_muxer && st->codecpar->codec_id == AV_CODEC_ID_DNXHD) { + // clip-wrapping requires 0x0D per ST2019-4:2009 or 0x06 per previous version ST2019-4:2008 + // we choose to use 0x06 instead 0x0D to be compatible with AVID systems + // and produce mxf files with the most relevant flavour for opatom + sc->track_essence_element_key[14] = 0x06; + } PRINT_KEY(s, "track essence element key", sc->track_essence_element_key); if (!present[sc->index]) |