[FFmpeg-devel] [PATCH] Fixed remuxing of HDMV PGS subtitles

Timothy Gu timothygu99 at gmail.com
Sun Apr 12 01:47:57 CEST 2015


From: Niklesh Lalwani <lalwani1994 at gmail.com>

Fixes #2622.
---

>From https://github.com/FFmpeg/FFmpeg/pull/125

 libavformat/mpegts.h    | 2 ++
 libavformat/mpegtsenc.c | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/libavformat/mpegts.h b/libavformat/mpegts.h
index 84f3098..f6a6551 100644
--- a/libavformat/mpegts.h
+++ b/libavformat/mpegts.h
@@ -60,6 +60,8 @@
 #define STREAM_TYPE_AUDIO_AC3       0x81
 #define STREAM_TYPE_AUDIO_DTS       0x82
 #define STREAM_TYPE_AUDIO_TRUEHD    0x83
+ 
+#define STREAM_TYPE_SUBTITLE_HDMV_PGS_SUBTITLE 0X90
 
 typedef struct MpegTSContext MpegTSContext;
 
diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index cc650bb..213766e 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -309,6 +309,9 @@ static int mpegts_write_pmt(AVFormatContext *s, MpegTSService *service)
         case AV_CODEC_ID_TRUEHD:
             stream_type = STREAM_TYPE_AUDIO_TRUEHD;
             break;
+        case AV_CODEC_ID_HDMV_PGS_SUBTITLE:
+            stream_type = STREAM_TYPE_SUBTITLE_HDMV_PGS_SUBTITLE;
+            break;
         default:
             stream_type = STREAM_TYPE_PRIVATE_DATA;
             break;


More information about the ffmpeg-devel mailing list