Mercurial > libavformat.hg
changeset 5346:e226b1d6a6ee libavformat
check that duration is set to avoid fpe
author | bcoudurier |
---|---|
date | Thu, 05 Nov 2009 07:17:10 +0000 |
parents | 4f2be9042fd6 |
children | f09a07cad10b |
files | mov.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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;