[FFmpeg-devel,2/2] lavf/mov: document the dvh1 codec switch based on hvcC availability

Submitted by Jan Ekström on Dec. 3, 2018, 1:19 a.m.

Details

Message ID 20181203011919.8354-2-jeebjp@gmail.com
State Accepted
Commit a1f0dd24f62532ff82ac87fbcb01244e6cdfa424
Headers show

Commit Message

Jan Ekström Dec. 3, 2018, 1:19 a.m.
---
 libavformat/mov.c | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Paul B Mahol Dec. 17, 2018, 9:25 p.m.
On 12/3/18, Jan Ekström <jeebjp@gmail.com> wrote:
> ---
>  libavformat/mov.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/libavformat/mov.c b/libavformat/mov.c
> index ec57a05803..497790522f 100644
> --- a/libavformat/mov.c
> +++ b/libavformat/mov.c
> @@ -1903,6 +1903,11 @@ static int mov_read_glbl(MOVContext *c, AVIOContext
> *pb, MOVAtom atom)
>      if (ret < 0)
>          return ret;
>      if (atom.type == MKTAG('h','v','c','C') && st->codecpar->codec_tag ==
> MKTAG('d','v','h','1'))
> +        /* HEVC-based Dolby Vision derived from hvc1.
> +           Happens to match with an identifier
> +           previously utilized for DV. Thus, if we have
> +           the hvcC extradata box available as specified,
> +           set codec to HEVC */
>          st->codecpar->codec_id = AV_CODEC_ID_HEVC;
>
>      return 0;
> --
> 2.19.2

OK

Patch hide | download patch | download mbox

diff --git a/libavformat/mov.c b/libavformat/mov.c
index ec57a05803..497790522f 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1903,6 +1903,11 @@  static int mov_read_glbl(MOVContext *c, AVIOContext *pb, MOVAtom atom)
     if (ret < 0)
         return ret;
     if (atom.type == MKTAG('h','v','c','C') && st->codecpar->codec_tag == MKTAG('d','v','h','1'))
+        /* HEVC-based Dolby Vision derived from hvc1.
+           Happens to match with an identifier
+           previously utilized for DV. Thus, if we have
+           the hvcC extradata box available as specified,
+           set codec to HEVC */
         st->codecpar->codec_id = AV_CODEC_ID_HEVC;
 
     return 0;