]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
avoid division by zero
authorAndreas Öman <andreas@lonelycoder.com>
Tue, 27 Nov 2007 11:11:52 +0000 (11:11 +0000)
committerAndreas Öman <andreas@lonelycoder.com>
Tue, 27 Nov 2007 11:11:52 +0000 (11:11 +0000)
tsmux.c

diff --git a/tsmux.c b/tsmux.c
index 53beb4c91dd03803810fce69c6820b6c29fc3176..a7518bf9152eca60889f75903aeee17aa157395e 100644 (file)
--- a/tsmux.c
+++ b/tsmux.c
@@ -134,7 +134,7 @@ tms_stream_set_active(th_muxer_t *tm, th_muxstream_t *tms, th_pkt_t *pkt,
   l = (pkt_len(pkt) + PES_HEADER_SIZE) / 188;
 
   tms->tms_dl = dl;
-  tms->tms_block_interval = dt / l;
+  tms->tms_block_interval = l == 0 ? 1 : dt / l;
 
   if(tms->tms_block_interval < 10)
     tms->tms_block_interval = 10;