changeset 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 7a3ed84008ec
children 155ce13f1033
files mpeg.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
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.  */