From f68742bf5b5e6858cdba98b57d8b52c1964b37d2 Mon Sep 17 00:00:00 2001 From: Mean Date: Wed, 2 Nov 2011 20:41:24 +0100 Subject: [PATCH] mpegtsenc: EAC3 support Reviewed-by: Baptiste Coudurier Signed-off-by: Michael Niedermayer --- libavformat/mpegtsenc.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c index fa773ebbee..f072f80d80 100644 --- a/libavformat/mpegtsenc.c +++ b/libavformat/mpegtsenc.c @@ -293,6 +293,12 @@ static void mpegts_write_pmt(AVFormatContext *s, MpegTSService *service) /* write optional descriptors here */ switch(st->codec->codec_type) { case AVMEDIA_TYPE_AUDIO: + if(st->codec->codec_id==CODEC_ID_EAC3){ + *q++=0x7a; // EAC3 descriptor see A038 DVB SI + *q++=1; // 1 byte, all flags sets to 0 + *q++=0; // omit all fields... + } + if (lang) { char *p; char *next = lang->value;