diff mbox

[FFmpeg-devel] lavf/mov: Force hevc codec_id for code-point hvc1 and hvcC extradata

Message ID CAB0OVGqpzAjYLjPJVM6c=+zYwaZ24RZ6SzhULYMHp6H2Rv2Lgw@mail.gmail.com
State Accepted
Headers show

Commit Message

Carl Eugen Hoyos Aug. 6, 2018, 10:41 p.m. UTC
Hi!

Attached patch fixes ticket #7347 for me.

Please comment, Carl Eugen

Comments

Carl Eugen Hoyos Aug. 8, 2018, 10:45 p.m. UTC | #1
2018-08-07 0:41 GMT+02:00, Carl Eugen Hoyos <ceffmpeg@gmail.com>:

> Attached patch fixes ticket #7347 for me.

Patch applied.

Carl Eugen
diff mbox

Patch

From 4f2bed32efe641d2fe21899a0b1d724ef225936a Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Date: Tue, 7 Aug 2018 00:33:40 +0200
Subject: [PATCH] lavf/mov: Force HEVC codec_id for code-point dvh1 and an
 hvcC atom.

The mp4 registration authority accepted a code-point for Dolby Vision
hevc that was already used as a fourcc for DVCPRO 100.

Fixes ticket #7347.
---
 libavformat/mov.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 82cd410..6885ef3 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1902,6 +1902,8 @@  static int mov_read_glbl(MOVContext *c, AVIOContext *pb, MOVAtom atom)
     ret = ff_get_extradata(c->fc, st->codecpar, pb, atom.size);
     if (ret < 0)
         return ret;
+    if (atom.type == MKTAG('h','v','c','C') && st->codecpar->codec_tag == MKTAG('d','v','h','1'))
+        st->codecpar->codec_id = AV_CODEC_ID_HEVC;
 
     return 0;
 }
-- 
1.7.10.4