Mercurial > libavformat.hg
comparison mov.c @ 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 |
comparison
equal
deleted
inserted
replaced
5345:4f2be9042fd6 | 5346:e226b1d6a6ee |
---|---|
1498 stts_sample = 0; | 1498 stts_sample = 0; |
1499 stts_index++; | 1499 stts_index++; |
1500 } | 1500 } |
1501 } | 1501 } |
1502 } | 1502 } |
1503 st->codec->bit_rate = stream_size*8*sc->time_scale/st->duration; | 1503 if (st->duration > 0) |
1504 st->codec->bit_rate = stream_size*8*sc->time_scale/st->duration; | |
1504 } else { | 1505 } else { |
1505 for (i = 0; i < sc->chunk_count; i++) { | 1506 for (i = 0; i < sc->chunk_count; i++) { |
1506 unsigned chunk_samples; | 1507 unsigned chunk_samples; |
1507 | 1508 |
1508 current_offset = sc->chunk_offsets[i]; | 1509 current_offset = sc->chunk_offsets[i]; |