[FFmpeg-devel] [PATCH] mpegts: Enable muxing of SMPTE KLV data
Paul B Mahol
onemda at gmail.com
Fri Jun 14 00:02:27 CEST 2013
On 6/11/13, Jeff Blackburne <jblackburne at gmail.com> wrote:
> This is basically a re-post of Peter Ross's patch to mux SMPTE
> key-length-value data. See these archive links:
> http://ffmpeg.org/pipermail/ffmpeg-devel/2012-October/132381.html
> http://ffmpeg.org/pipermail/ffmpeg-devel/2012-December/135502.html
>
> The demux patch has already been accepted, and works well for me. I've
> tested this patch as well, and it works as expected.
>
> ---
> libavformat/mpegtsenc.c | 14 ++++++++++++--
> 1 files changed, 12 insertions(+), 2 deletions(-)
>
> diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
> index 0ddae65..0da65a5 100644
> --- a/libavformat/mpegtsenc.c
> +++ b/libavformat/mpegtsenc.c
> @@ -397,6 +397,16 @@ static void mpegts_write_pmt(AVFormatContext *s,
> MpegTSService *service)
> *q++ = 'c';
> }
> break;
> + case AVMEDIA_TYPE_DATA:
> + if (st->codec->codec_id == AV_CODEC_ID_SMPTE_KLV) {
> + *q++ = 0x05; /* MPEG-2 registration descriptor */
> + *q++ = 4;
> + *q++ = 'K';
> + *q++ = 'L';
> + *q++ = 'V';
> + *q++ = 'A';
OT: Yes, this follows style of rest of file, but i find it extremly ugly.
More information about the ffmpeg-devel
mailing list