Mercurial > libavformat.hg
comparison utils.c @ 2401:c356a88cedf6 libavformat
Do not butcher start_time in av_estimate_timings_from_bit_rate().
from a patch by neilb suse de
author | michael |
---|---|
date | Sat, 18 Aug 2007 01:26:06 +0000 |
parents | fcaecfb05781 |
children | 70b45051aef6 |
comparison
equal
deleted
inserted
replaced
2400:fcaecfb05781 | 2401:c356a88cedf6 |
---|---|
1458 filesize = ic->file_size; | 1458 filesize = ic->file_size; |
1459 if (filesize > 0) { | 1459 if (filesize > 0) { |
1460 for(i = 0; i < ic->nb_streams; i++) { | 1460 for(i = 0; i < ic->nb_streams; i++) { |
1461 st = ic->streams[i]; | 1461 st = ic->streams[i]; |
1462 duration= av_rescale(8*filesize, st->time_base.den, ic->bit_rate*(int64_t)st->time_base.num); | 1462 duration= av_rescale(8*filesize, st->time_base.den, ic->bit_rate*(int64_t)st->time_base.num); |
1463 if (st->start_time == AV_NOPTS_VALUE || | 1463 if (st->duration == AV_NOPTS_VALUE) |
1464 st->duration == AV_NOPTS_VALUE) { | |
1465 st->start_time = 0; | |
1466 st->duration = duration; | 1464 st->duration = duration; |
1467 } | |
1468 } | 1465 } |
1469 } | 1466 } |
1470 } | 1467 } |
1471 } | 1468 } |
1472 | 1469 |