Hi, sorry for delay, I wasn't tracking response, let's try it as attachment.

Thx

On 6/6/19 11:58 PM, Michael Niedermayer wrote:
On Wed, Jun 05, 2019 at 11:13:20PM +0200, Tomas Hulata wrote:
When mux_rate (CBR) is defined, pat/sdt period setting is now respected. In
case of VBR, leave it as it was.

---
  libavformat/mpegtsenc.c | 12 ++++++++++--
  1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index fc0ea225c6..5ad1f813e0 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -999,10 +999,18 @@ static int mpegts_init(AVFormatContext *s)
      ts->last_sdt_ts = AV_NOPTS_VALUE;
git doesnt like this patch
Applying: mpegts pat and sdt period should respect user options
error: corrupt patch at line 10

[...]


_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
--
S pozdravom
Tomas Hulata
/vedoucí úseku systemových inženýrů/
tel: +420 733 163 238
NETBOX  

SMART Comp. a.s., Kubíčkova 8, 635 00, Brno
Tel./fax: +420 544 423 411, www.netbox.cz

diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index fc0ea225c6..d2706b7d80 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -999,10 +999,18 @@ static int mpegts_init(AVFormatContext *s)
     ts->last_sdt_ts = AV_NOPTS_VALUE;
     // The user specified a period, use only it
     if (ts->pat_period < INT_MAX/2) {
-        ts->pat_packet_period = INT_MAX;
+        if (ts->mux_rate > 1)
+            ts->pat_packet_period = (int64_t)ts->mux_rate * ts->pat_period /
+                                    (TS_PACKET_SIZE * 8);
+        else
+            ts->pat_packet_period = INT_MAX;
     }
     if (ts->sdt_period < INT_MAX/2) {
-        ts->sdt_packet_period = INT_MAX;
+        if (ts->mux_rate > 1)
+            ts->sdt_packet_period = (int64_t)ts->mux_rate * ts->sdt_period /
+                                    (TS_PACKET_SIZE * 8);
+        else
+            ts->sdt_packet_period = INT_MAX;
     }
 
     // output a PCR as soon as possible

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to