[FFmpeg-devel] [PATCH 02/10] avformat/mpegtsenc: set priority flag for AC3 codecs if writing BluRay

Marton Balint cus at passwd.hu
Tue Nov 12 23:28:58 EET 2019


Signed-off-by: Marton Balint <cus at passwd.hu>
---
 libavformat/mpegtsenc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index fbc7305dc1..46cfc68904 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -1237,6 +1237,8 @@ static void mpegts_write_pes(AVFormatContext *s, AVStream *st,
         q    = buf;
         *q++ = 0x47;
         val  = ts_st->pid >> 8;
+        if (ts->m2ts_mode && st->codecpar->codec_id == AV_CODEC_ID_AC3)
+            val |= 0x20;
         if (is_start)
             val |= 0x40;
         *q++      = val;
-- 
2.16.4



More information about the ffmpeg-devel mailing list