aboutsummaryrefslogtreecommitdiffstats
path: root/Game
diff options
context:
space:
mode:
authorb1indy <b1indy@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-09-01 13:40:58 +0000
committerb1indy <b1indy@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-09-01 13:40:58 +0000
commit840abe2817971ba4d69f0e36c26bde4f32a42998 (patch)
tree2806f7b9bf17334f5f285ad39aedc34acabed964 /Game
parent29bfe93f952496c81d1ca02b8d6291275a4be308 (diff)
downloadusdx-840abe2817971ba4d69f0e36c26bde4f32a42998.tar.gz
usdx-840abe2817971ba4d69f0e36c26bde4f32a42998.tar.xz
usdx-840abe2817971ba4d69f0e36c26bde4f32a42998.zip
re-commit, now with debugging things disabled
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@358 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r--Game/Code/SMpeg/Uffmpeg.pas8
1 files changed, 5 insertions, 3 deletions
diff --git a/Game/Code/SMpeg/Uffmpeg.pas b/Game/Code/SMpeg/Uffmpeg.pas
index e72c4ed5..f10f40d3 100644
--- a/Game/Code/SMpeg/Uffmpeg.pas
+++ b/Game/Code/SMpeg/Uffmpeg.pas
@@ -5,7 +5,7 @@
# based on 'An ffmpeg and SDL Tutorial' (http://www.dranger.com/ffmpeg/) #
#############################################################################}
-{$define DebugDisplay}
+//{$define DebugDisplay}
unit Uffmpeg;
@@ -140,7 +140,9 @@ begin
end;
VideoTimeBase:=VideoCodecContext^.time_base.num/VideoCodecContext^.time_base.den;
// hack to get reasonable timebase for divx
+{$ifdef DebugDisplay}
showmessage('framerate: '+inttostr(floor(1/videotimebase))+'fps');
+{$endif}
while VideoTimeBase < 0.02 do VideoTimeBase:=VideoTimeBase*10;
{$ifdef DebugDisplay}
showmessage('calculated framerate: '+inttostr(floor(1/videotimebase))+'fps');
@@ -237,10 +239,10 @@ begin
// if we did not get an new frame, there's nothing more to do
if Framefinished=0 then Exit;
// otherwise we convert the pixeldata from YUV to RGB
-{ errnum:=img_convert(PAVPicture(AVFrameRGB), PIX_FMT_RGB24,
+ errnum:=img_convert(PAVPicture(AVFrameRGB), PIX_FMT_RGB24,
PAVPicture(AVFrame), VideoCodecContext^.pix_fmt,
VideoCodecContext^.width, VideoCodecContext^.height);
-}errnum:=1;
+//errnum:=1;
if errnum >=0 then begin
// copy RGB pixeldata to our TextureBuffer
// (line by line)