[FFmpeg-devel] [PATCH] HDMV PGS subtitles-Ticket #2622

Philip Langdale philipl at overt.org
Wed Mar 25 05:01:26 CET 2015


On Wed, 25 Mar 2015 00:11:26 +0530
Niklesh Lalwani <lalwani1994 at gmail.com> wrote:

> 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


Hi Niklesh,

Please use git send-email to send the patch to the list. This is the
standard way that people do this. It will include your commit message
and correctly set the subject line, etc.

You can look at the git history to see how to format your commit
message. eg: Look at commit 0637b59c2c6aeadead256bdc60fbce32d3d43615

When generating your patch file with git format-patch, remember to use
'-s' to append a signed-off line.

I'm sure this seems pedantic, but you will be sending many patches to
the list if you're successful, so getting familiar with the workflow is
an important first step.

Thanks,

--phil
 
> ---
>  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