aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-06-12 13:27:28 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-06-12 13:27:28 +0000
commit0643ec049ea85731c8f1409f3d40d70131147e5d (patch)
tree7cc8827652606c460cc3d1399c47aa3fe1465dc9 /src
parentf42ea048e902781932430c1b733cdba626d6ed54 (diff)
downloadusdx-0643ec049ea85731c8f1409f3d40d70131147e5d.tar.gz
usdx-0643ec049ea85731c8f1409f3d40d70131147e5d.tar.xz
usdx-0643ec049ea85731c8f1409f3d40d70131147e5d.zip
fix seeking in videos
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2500 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'src')
-rw-r--r--src/media/UVideo.pas5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/media/UVideo.pas b/src/media/UVideo.pas
index e8cfbbf7..15493881 100644
--- a/src/media/UVideo.pas
+++ b/src/media/UVideo.pas
@@ -1315,7 +1315,10 @@ begin
fEOF := false;
fFrameTexValid := false;
- if (av_seek_frame(fFormatContext, fStreamIndex, Floor(Time/fTimeBase), SeekFlags) < 0) then
+ if (av_seek_frame(fFormatContext,
+ fStreamIndex,
+ Round(Time / av_q2d(fStream^.time_base)),
+ SeekFlags) < 0) then
begin
Log.LogError('av_seek_frame() failed', 'TVideoPlayback_ffmpeg.SetPosition');
Exit;