avformat/mpegtsenc: set priority flag for AC3 codecs if writing BluRay
authorMarton Balint <cus@passwd.hu>
Sun, 10 Nov 2019 21:12:28 +0000 (22:12 +0100)
committerMarton Balint <cus@passwd.hu>
Tue, 3 Dec 2019 10:00:11 +0000 (11:00 +0100)
Signed-off-by: Marton Balint <cus@passwd.hu>
libavformat/mpegtsenc.c

index b578539..92c7820 100644 (file)
@@ -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;