[FFmpeg-devel] [PATCH 3/4] mpegtsenc: set audio_type according to st->disposition

Anssi Hannula anssi.hannula
Sat Feb 12 19:24:40 CET 2011


---
 libavformat/mpegtsenc.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index b1bccd1..a9e381e 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -289,6 +289,13 @@ static void mpegts_write_pmt(AVFormatContext *s, MpegTSService *service)
                 *q++ = lang->value[0];
                 *q++ = lang->value[1];
                 *q++ = lang->value[2];
+                if (st->disposition & AV_DISPOSITION_KARAOKE)
+                    *q++ = 0x01; /* clean effects */
+                else if (st->disposition & AV_DISPOSITION_HEARING_IMPAIRED)
+                    *q++ = 0x02;
+                else if (st->disposition & AV_DISPOSITION_VISUAL_IMPAIRED)
+                    *q++ = 0x03;
+                else
                 *q++ = 0; /* undefined type */
             }
             break;
-- 
1.7.3




More information about the ffmpeg-devel mailing list