aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS2
-rw-r--r--src/decoder/ffmpeg_decoder_plugin.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 5f0d030cd..8abe0baae 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,8 @@ ver 0.16.5 (2010/??/??)
* pcm_format: fix 32-to-24 bit conversion (the "silence" bug)
* input:
- rewind: reduce heap usage
+* decoder:
+ - ffmpeg: higher precision timestamps
ver 0.16.4 (2011/09/01)
diff --git a/src/decoder/ffmpeg_decoder_plugin.c b/src/decoder/ffmpeg_decoder_plugin.c
index 484796fe3..1a1598f36 100644
--- a/src/decoder/ffmpeg_decoder_plugin.c
+++ b/src/decoder/ffmpeg_decoder_plugin.c
@@ -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