diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-12-11 19:21:39 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-12-11 19:21:39 +0100 |
commit | 16abd687798bbf9192ba4954765e61de96065b8b (patch) | |
tree | 558f9e76e87cac0088efcaa673fd699bd4d203fe /libavformat | |
parent | 616eaea8ad0becdeeb75a783e8924a1aa12309ec (diff) | |
download | ffmpeg-16abd687798bbf9192ba4954765e61de96065b8b.tar.gz |
seektest: floatfree
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/seek-test.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libavformat/seek-test.c b/libavformat/seek-test.c index ec88a0baf2..519f9492ab 100644 --- a/libavformat/seek-test.c +++ b/libavformat/seek-test.c @@ -48,13 +48,12 @@ static const char *ret_str(int v) static void ts_str(char buffer[60], int64_t ts, AVRational base) { - double tsval; if (ts == AV_NOPTS_VALUE) { strcpy(buffer, " NOPTS "); return; } - tsval = ts * av_q2d(base); - snprintf(buffer, 60, "%9f", tsval); + ts= av_rescale_q(ts, base, (AVRational){1, 1000000}); + snprintf(buffer, 60, "%c%Ld.%06Ld", ts<0 ? '-' : ' ', FFABS(ts)/1000000, FFABS(ts)%1000000); } int main(int argc, char **argv) |