[FFmpeg-cvslog] mpegts: demux BluRay text subtitles

Petri Hintukainen git at videolan.org
Tue Sep 1 14:57:28 CEST 2015


ffmpeg | branch: master | Petri Hintukainen <phintuka at gmail.com> | Tue Sep  1 11:56:21 2015 +0300| [5d12d7de2ce548a3c9f5c175a9d1c5bfbdbcbfa8] | committer: Michael Niedermayer

mpegts: demux BluRay text subtitles

Reviewed-by: Paul B Mahol <onemda at gmail.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5d12d7de2ce548a3c9f5c175a9d1c5bfbdbcbfa8
---

 libavcodec/avcodec.h    |    1 +
 libavcodec/codec_desc.c |    7 +++++++
 libavformat/mpegts.c    |    1 +
 3 files changed, 9 insertions(+)

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 12a6b54..9d38b59 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -530,6 +530,7 @@ enum AVCodecID {
     AV_CODEC_ID_VPLAYER    = MKBETAG('V','P','l','r'),
     AV_CODEC_ID_PJS        = MKBETAG('P','h','J','S'),
     AV_CODEC_ID_ASS        = MKBETAG('A','S','S',' '),  ///< ASS as defined in Matroska
+    AV_CODEC_ID_HDMV_TEXT_SUBTITLE = MKBETAG('B','D','T','X'),
 
     /* other specific kind of codecs (generally used for attachments) */
     AV_CODEC_ID_FIRST_UNKNOWN = 0x18000,           ///< A dummy ID pointing at the start of various fake codecs.
diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c
index c172bf8..487bc2f 100644
--- a/libavcodec/codec_desc.c
+++ b/libavcodec/codec_desc.c
@@ -2735,6 +2735,13 @@ static const AVCodecDescriptor codec_descriptors[] = {
         .long_name = NULL_IF_CONFIG_SMALL("WebVTT subtitle"),
         .props     = AV_CODEC_PROP_TEXT_SUB,
     },
+    {
+        .id        = AV_CODEC_ID_HDMV_TEXT_SUBTITLE,
+        .type      = AVMEDIA_TYPE_SUBTITLE,
+        .name      = "hdmv_text_subtitle",
+        .long_name = NULL_IF_CONFIG_SMALL("HDMV Text subtitle"),
+        .props     = AV_CODEC_PROP_TEXT_SUB,
+    },
 
     /* other kind of codecs and pseudo-codecs */
     {
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 7f199d4..ed0a86b 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -718,6 +718,7 @@ static const StreamType HDMV_types[] = {
     { 0xa1, AVMEDIA_TYPE_AUDIO,    AV_CODEC_ID_EAC3              }, /* E-AC3 Secondary Audio */
     { 0xa2, AVMEDIA_TYPE_AUDIO,    AV_CODEC_ID_DTS               }, /* DTS Express Secondary Audio */
     { 0x90, AVMEDIA_TYPE_SUBTITLE, AV_CODEC_ID_HDMV_PGS_SUBTITLE },
+    { 0x92, AVMEDIA_TYPE_SUBTITLE, AV_CODEC_ID_HDMV_TEXT_SUBTITLE },
     { 0 },
 };
 



More information about the ffmpeg-cvslog mailing list