aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-09-15 21:07:32 +0200
committerMax Kellermann <max@duempel.org>2011-09-15 21:30:27 +0200
commit42d8c2981f4e76fab5c4c3ed6ff840df7a41a1a4 (patch)
tree6e8d679533dd4820d560a047bc35a455ca3ee795 /src
parent9aa91e0f171d63015a70b0f74335333bb4735763 (diff)
downloadmpd-42d8c2981f4e76fab5c4c3ed6ff840df7a41a1a4.tar.gz
mpd-42d8c2981f4e76fab5c4c3ed6ff840df7a41a1a4.tar.xz
mpd-42d8c2981f4e76fab5c4c3ed6ff840df7a41a1a4.zip
decoder/ffmpeg: higher precision timestamps
Diffstat (limited to '')
-rw-r--r--src/decoder/ffmpeg_decoder_plugin.c3
1 files changed, 2 insertions, 1 deletions
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