diff options
author | Tim Walker <tdskywalker@gmail.com> | 2014-03-03 18:53:41 +0400 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2014-03-09 21:09:40 +0400 |
commit | 20b40a597cdd4969cf1147d7c7efee2b6232524b (patch) | |
tree | 0a236e387e8a76a7b09af9fb084ed0d2da8f90e7 /libavformat/movenc.c | |
parent | 1d9014f0b008485eac4c19d5f5e11ede59237167 (diff) |
movenc: write hvcC tag for HEVC.
Diffstat (limited to 'libavformat/movenc.c')
-rw-r--r-- | libavformat/movenc.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 6344e38298..641e1c7f48 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -39,6 +39,7 @@ #include "libavutil/mathematics.h" #include "libavutil/opt.h" #include "libavutil/dict.h" +#include "hevc.h" #include "rtpenc.h" #include "mov_chan.h" @@ -685,6 +686,16 @@ static int mov_write_avcc_tag(AVIOContext *pb, MOVTrack *track) return update_size(pb, pos); } +static int mov_write_hvcc_tag(AVIOContext *pb, MOVTrack *track) +{ + int64_t pos = avio_tell(pb); + + avio_wb32(pb, 0); + ffio_wfourcc(pb, "hvcC"); + ff_isom_write_hvcc(pb, track->vos_data, track->vos_len, 0); + return update_size(pb, pos); +} + /* also used by all avid codecs (dv, imx, meridien) and their variants */ static int mov_write_avid_tag(AVIOContext *pb, MOVTrack *track) { @@ -1035,6 +1046,8 @@ static int mov_write_video_tag(AVIOContext *pb, MOVTrack *track) mov_write_svq3_tag(pb); else if (track->enc->codec_id == AV_CODEC_ID_DNXHD) mov_write_avid_tag(pb, track); + else if (track->enc->codec_id == AV_CODEC_ID_HEVC) + mov_write_hvcc_tag(pb, track); else if (track->enc->codec_id == AV_CODEC_ID_H264) { mov_write_avcc_tag(pb, track); if (track->mode == MODE_IPOD) |