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)
committerJohn Stebbins <stebbins@jetheaddev.com>
Tue, 20 Jun 2017 15:08:38 +0000 (08:08 -0700)
libavformat/movenc.c

index 7791007..f637508 100644 (file)
@@ -727,7 +727,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);
 }