From 840abe2817971ba4d69f0e36c26bde4f32a42998 Mon Sep 17 00:00:00 2001 From: b1indy Date: Sat, 1 Sep 2007 13:40:58 +0000 Subject: 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 --- Game/Code/SMpeg/Uffmpeg.pas | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'Game/Code/SMpeg') 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) -- cgit v1.2.3