[FFmpeg-devel] [PATCH] HDMV PGS subtitles-Ticket #2622
Niklesh Lalwani
lalwani1994 at gmail.com
Tue Mar 24 19:41:26 CET 2015
Hi Everyone,
This is the fix for issue #2622 <https://trac.ffmpeg.org/ticket/2622>.
These changes enables to remux m2ts file so that the new file has playable
subtitles.
Thanks,
Niklesh Lalwani
---
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;
--
1.9.1
More information about the ffmpeg-devel
mailing list