decoder/ffmpeg: higher precision timestamps

This commit is contained in:
Max Kellermann
2011-09-15 21:07:32 +02:00
parent 9aa91e0f17
commit 42d8c2981f
2 changed files with 4 additions and 1 deletions

View File

@@ -220,7 +220,8 @@ time_from_ffmpeg(int64_t t, const AVRational time_base)
{
assert(t != (int64_t)AV_NOPTS_VALUE);
return av_rescale_q(t, time_base, (AVRational){1, 1});
return (double)av_rescale_q(t, time_base, (AVRational){1, 1024})
/ (double)1024;
}
static enum decoder_command