[5/5] movenc: allow alternative hvc1 h.265 codec tag

Message ID 20170619150209.27009-5-stebbins@jetheaddev.com
State New
Headers show

Commit Message

John Stebbins June 19, 2017, 3:02 p.m.
If AVCodecParameters.codec_tag is 'hvc1' use it instead of 'hev1' for
h.265 streams. QuickTime (and other Apple software) requires 'hvc1'.
---
 libavformat/movenc.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Martin Storsjö June 20, 2017, 6:05 a.m. | #1
On Mon, 19 Jun 2017, John Stebbins wrote:

> If AVCodecParameters.codec_tag is 'hvc1' use it instead of 'hev1' for
> h.265 streams. QuickTime (and other Apple software) requires 'hvc1'.
> ---
> libavformat/movenc.c | 1 +
> 1 file changed, 1 insertion(+)

Ok

// Martin

Patch

diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 5b5082d..d79646c 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -4398,6 +4398,7 @@  const AVCodecTag codec_mp4_tags[] = {
     { AV_CODEC_ID_MPEG4       , MKTAG('m', 'p', '4', 'v') },
     { AV_CODEC_ID_H264        , MKTAG('a', 'v', 'c', '1') },
     { AV_CODEC_ID_HEVC        , MKTAG('h', 'e', 'v', '1') },
+    { AV_CODEC_ID_HEVC        , MKTAG('h', 'v', 'c', '1') },
     { AV_CODEC_ID_AAC         , MKTAG('m', 'p', '4', 'a') },
     { AV_CODEC_ID_MP4ALS      , MKTAG('m', 'p', '4', 'a') },
     { AV_CODEC_ID_MPEG2VIDEO  , MKTAG('m', 'p', '4', 'v') },