Skip to content
This repository was archived by the owner on Apr 9, 2018. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions libavcodec/avcodec.h
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ enum CodecID {
CODEC_ID_BINTEXT,
CODEC_ID_XBIN,
CODEC_ID_IDF,
CODEC_ID_S436M,

CODEC_ID_PROBE= 0x19000, ///< codec_id is not known (like CODEC_ID_NONE) but lavf should attempt to identify it

Expand Down
1 change: 1 addition & 0 deletions libavformat/mxf.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ const MXFCodecUL ff_mxf_codec_uls[] = {
{ { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x02,0x02,0x02,0x03,0x02,0x01,0x00 }, 15, CODEC_ID_AC3 },
{ { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x02,0x02,0x02,0x03,0x02,0x05,0x00 }, 15, CODEC_ID_MP2 }, /* MP2 or MP3 */
//{ { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x02,0x02,0x02,0x03,0x02,0x1C,0x00 }, 15, CODEC_ID_DOLBY_E }, /* Dolby-E */
{ { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x09,0x0D,0x01,0x03,0x01,0x02,0x0E,0x00,0x00 }, 14, CODEC_ID_S436M }, /* SMPTE 436M MXF Mappings for VBI Lines and Ancillary Data Packets */
{ { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, 0, CODEC_ID_NONE },
};

Expand Down
5 changes: 5 additions & 0 deletions libavformat/mxfdec.c
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,7 @@ static const MXFCodecUL mxf_essence_container_uls[] = {
{ { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x0D,0x01,0x03,0x01,0x02,0x06,0x01,0x00 }, 14, CODEC_ID_PCM_S16LE }, /* BWF Frame wrapped */
{ { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x02,0x0D,0x01,0x03,0x01,0x02,0x04,0x40,0x01 }, 14, CODEC_ID_MP2 }, /* MPEG-ES Frame wrapped, 0x40 ??? stream id */
{ { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x0D,0x01,0x03,0x01,0x02,0x01,0x01,0x01 }, 14, CODEC_ID_PCM_S16LE }, /* D-10 Mapping 50Mbps PAL Extended Template */
{ { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x09,0x0D,0x01,0x03,0x01,0x02,0x0E,0x00,0x00 }, 14, CODEC_ID_S436M }, /* SMPTE 436M MXF Mappings for VBI Lines and Ancillary Data Packets */
{ { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, 0, CODEC_ID_NONE },
};

Expand Down Expand Up @@ -928,6 +929,10 @@ static int mxf_parse_structural_metadata(MXFContext *mxf)
} else if (st->codec->codec_id == CODEC_ID_MP2) {
st->need_parsing = AVSTREAM_PARSE_FULL;
}
} else if (st->codec->codec_type == AVMEDIA_TYPE_DATA) {
container_ul = mxf_get_codec_ul(mxf_essence_container_uls, essence_container_ul);
if (st->codec->codec_id == CODEC_ID_NONE)
st->codec->codec_id = container_ul->id;
}
if (st->codec->codec_type != AVMEDIA_TYPE_DATA && (*essence_container_ul)[15] > 0x01) {
av_log(mxf->fc, AV_LOG_WARNING, "only frame wrapped mappings are correctly supported\n");
Expand Down