movenc: write correct format hvcc when tag is hvc1
authorJohn Stebbins <stebbins@jetheaddev.com>
Thu, 15 Jun 2017 18:41:15 +0000 (11:41 -0700)
committerDerek Buitenhuis <derek.buitenhuis@gmail.com>
Wed, 5 Jul 2017 19:55:25 +0000 (15:55 -0400)
(cherry picked from commit 1ea9b7fdf99b60c0db95a2ce97b2108469bbb245)
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
libavformat/movenc.c

index b0ae6bf..e7234ac 100644 (file)
@@ -1126,7 +1126,10 @@ static int mov_write_hvcc_tag(AVIOContext *pb, MOVTrack *track)
 
     avio_wb32(pb, 0);
     ffio_wfourcc(pb, "hvcC");
-    ff_isom_write_hvcc(pb, track->vos_data, track->vos_len, 0);
+    if (track->tag == MKTAG('h','v','c','1'))
+        ff_isom_write_hvcc(pb, track->vos_data, track->vos_len, 1);
+    else
+        ff_isom_write_hvcc(pb, track->vos_data, track->vos_len, 0);
     return update_size(pb, pos);
 }