OSDN Git Service

avconv: use lrint() for rounding double timestamps
authorMans Rullgard <mans@mansr.com>
Thu, 10 May 2012 11:19:10 +0000 (12:19 +0100)
committerMans Rullgard <mans@mansr.com>
Thu, 10 May 2012 21:54:27 +0000 (22:54 +0100)
commit4f1500689d662cfe08bff6d949f7fb49311024da
treee2056d37f05397ad61d23414869aa58e3ba87bef
parent110d0cdc9d1ec414a658f841a3fbefbf6f796d61
avconv: use lrint() for rounding double timestamps

Converting the double to float for lrintf() loses precision when
the value is not exactly representable as a single-precision float.
Apart from being inaccurate, this causes discrepancies in some
configurations due to differences in rounding.

Note that the changed timestamp in the vc1-ism test is a bogus,
made-up value.

Signed-off-by: Mans Rullgard <mans@mansr.com>
avconv.c
tests/ref/fate/vc1-ism