aboutsummaryrefslogtreecommitdiff
path: root/libavformat/mxfdec.c
diff options
context:
space:
mode:
authorPaul B Mahol2018-12-05 18:49:41 +0100
committerPaul B Mahol2018-12-07 20:08:37 +0100
commitcc6208cde26ab9b04e661e9cc956414aa8739104 (patch)
treeee8532f89f5d47096ae9920e517331277b1d166b /libavformat/mxfdec.c
parent3cc5576ee1003aa14d6fb3135c2b11d9ae8c5aa2 (diff)
avformat/mxfdec: set codec_tag for prores codec
Diffstat (limited to 'libavformat/mxfdec.c')
-rw-r--r--libavformat/mxfdec.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index f49890e140..abf9938fe0 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -2432,6 +2432,18 @@ static int mxf_parse_structural_metadata(MXFContext *mxf)
default:
av_log(mxf->fc, AV_LOG_INFO, "Unknown frame layout type: %d\n", descriptor->frame_layout);
}
+
+ if (st->codecpar->codec_id == AV_CODEC_ID_PRORES) {
+ switch (descriptor->essence_codec_ul[14]) {
+ case 1: st->codecpar->codec_tag = MKTAG('a','p','c','o'); break;
+ case 2: st->codecpar->codec_tag = MKTAG('a','p','c','s'); break;
+ case 3: st->codecpar->codec_tag = MKTAG('a','p','c','n'); break;
+ case 4: st->codecpar->codec_tag = MKTAG('a','p','c','h'); break;
+ case 5: st->codecpar->codec_tag = MKTAG('a','p','4','h'); break;
+ case 6: st->codecpar->codec_tag = MKTAG('a','p','4','x'); break;
+ }
+ }
+
if (st->codecpar->codec_id == AV_CODEC_ID_RAWVIDEO) {
st->codecpar->format = descriptor->pix_fmt;
if (st->codecpar->format == AV_PIX_FMT_NONE) {