# HG changeset patch # User bcoudurier # Date 1257405430 0 # Node ID e226b1d6a6eeafb766feeb7903985695c076a364 # Parent 4f2be9042fd695cd25cc9811850764c4714db063 check that duration is set to avoid fpe diff -r 4f2be9042fd6 -r e226b1d6a6ee mov.c --- a/mov.c Thu Nov 05 07:11:54 2009 +0000 +++ b/mov.c Thu Nov 05 07:17:10 2009 +0000 @@ -1500,7 +1500,8 @@ } } } - st->codec->bit_rate = stream_size*8*sc->time_scale/st->duration; + if (st->duration > 0) + st->codec->bit_rate = stream_size*8*sc->time_scale/st->duration; } else { for (i = 0; i < sc->chunk_count; i++) { unsigned chunk_samples;