Browse code

mpegtsenc: EAC3 support

Reviewed-by: Baptiste Coudurier <baptiste.coudurier@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>

Mean authored on 2011/11/03 04:41:24
Showing 1 changed files
... ...
@@ -293,6 +293,12 @@ static void mpegts_write_pmt(AVFormatContext *s, MpegTSService *service)
293 293
         /* write optional descriptors here */
294 294
         switch(st->codec->codec_type) {
295 295
         case AVMEDIA_TYPE_AUDIO:
296
+            if(st->codec->codec_id==CODEC_ID_EAC3){
297
+                *q++=0x7a; // EAC3 descriptor see A038 DVB SI
298
+                *q++=1; // 1 byte, all flags sets to 0
299
+                *q++=0; // omit all fields...
300
+            }
301
+
296 302
             if (lang) {
297 303
                 char *p;
298 304
                 char *next = lang->value;