diff options
author | ritsuka <[email protected]> | 2015-01-31 07:53:18 +0000 |
---|---|---|
committer | ritsuka <[email protected]> | 2015-01-31 07:53:18 +0000 |
commit | a4416e99f06e31e1da8767d071e882f32c5a4e67 (patch) | |
tree | 9ebfa8b311c53a7b44d34715d8d2d318f4ba4f2a /libhb/muxavformat.c | |
parent | f30872bdcb2f5a97eddfbb3ea9e06d952cf29042 (diff) |
Add support for open type font attachments.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6839 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/muxavformat.c')
-rw-r--r-- | libhb/muxavformat.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/libhb/muxavformat.c b/libhb/muxavformat.c index ae0eff711..67797da74 100644 --- a/libhb/muxavformat.c +++ b/libhb/muxavformat.c @@ -780,7 +780,7 @@ static int avformatInit( hb_mux_object_t * m ) { hb_attachment_t * attachment = hb_list_item( list_attachment, i ); - if (attachment->type == FONT_TTF_ATTACH && + if ((attachment->type == FONT_TTF_ATTACH || attachment->type == FONT_OTF_ATTACH) && attachment->size > 0) { AVStream *st = avformat_new_stream(m->oc, NULL); @@ -792,7 +792,15 @@ static int avformatInit( hb_mux_object_t * m ) avcodec_get_context_defaults3(st->codec, NULL); st->codec->codec_type = AVMEDIA_TYPE_ATTACHMENT; - st->codec->codec_id = AV_CODEC_ID_TTF; + if (attachment->type == FONT_TTF_ATTACH) + { + st->codec->codec_id = AV_CODEC_ID_TTF; + } + else if (attachment->type == FONT_OTF_ATTACH) + { + st->codec->codec_id = MKBETAG( 0 ,'O','T','F'); + av_dict_set(&st->metadata, "mimetype", "application/vnd.ms-opentype", 0); + } priv_size = attachment->size; priv_data = av_malloc(priv_size); |