diff mpeg.c @ 291:b19f70a6d60f libavformat

1/0 fix by (Tim Allen <tim at proximity dot com dot au>)
author michael
date Tue, 28 Oct 2003 10:55:15 +0000
parents a313e1080322
children 62cec412a186
line wrap: on
line diff
--- a/mpeg.c	Sun Oct 26 10:49:49 2003 +0000
+++ b/mpeg.c	Tue Oct 28 10:55:15 2003 +0000
@@ -226,6 +226,10 @@
     else
         /* every 2 seconds */
         s->pack_header_freq = 2 * bitrate / s->packet_size / 8;
+
+    /* the above seems to make pack_header_freq zero sometimes */
+    if (s->pack_header_freq == 0)
+       s->pack_header_freq = 1;
     
     if (s->is_mpeg2)
         /* every 200 packets. Need to look at the spec.  */