diff mbox

[FFmpeg-devel] avformat/mpegtsenc: do not write SDT for m2ts

Message ID 20191114220246.23499-1-cus@passwd.hu
State New
Headers show

Commit Message

Marton Balint Nov. 14, 2019, 10:02 p.m. UTC
BDMV does not seem to use it.

Signed-off-by: Marton Balint <cus@passwd.hu>
---
 doc/muxers.texi         | 3 ++-
 libavformat/mpegtsenc.c | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/doc/muxers.texi b/doc/muxers.texi
index 4e76b40151..aa4bde518d 100644
--- a/doc/muxers.texi
+++ b/doc/muxers.texi
@@ -1633,7 +1633,8 @@  is less than 100 ms is used for VBR streams.
 Maximum time in seconds between PAT/PMT tables. Default is @code{0.1}.
 
 @item sdt_period @var{duration}
-Maximum time in seconds between SDT tables. Default is @code{0.5}.
+Maximum time in seconds between SDT tables. Default is @code{0.5}. Regardless
+of this setting no SDT is written in m2ts mode.
 
 @item tables_version @var{integer}
 Set PAT, PMT and SDT version (default @code{0}, valid values are from 0 to 31, inclusively).
diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index f37aa31915..a10a3e2450 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -1074,7 +1074,8 @@  static void retransmit_si_info(AVFormatContext *s, int force_pat, int force_sdt,
     ) {
         if (pcr != AV_NOPTS_VALUE)
             ts->last_sdt_ts = FFMAX(pcr, ts->last_sdt_ts);
-        mpegts_write_sdt(s);
+        if (!ts->m2ts_mode)
+            mpegts_write_sdt(s);
     }
     if ((pcr != AV_NOPTS_VALUE && ts->last_pat_ts == AV_NOPTS_VALUE) ||
         (pcr != AV_NOPTS_VALUE && pcr - ts->last_pat_ts >= ts->pat_period) ||