From 89ac41a2ccb85d6dfccb501ff4877231cab72094 Mon Sep 17 00:00:00 2001 From: tobigun Date: Tue, 5 Feb 2008 13:43:38 +0000 Subject: Update of the ffmpeg headers to their current trunk versions. IMPORTANT: parameter of av_free_packet is a pointer now procedure av_free_packet (pkt: PAVPacket); as it is with av_free() and av_freep() git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@814 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/lib/ffmpeg/rational.pas | 92 +++++++++++++++++++++++++++++++-------- 1 file changed, 73 insertions(+), 19 deletions(-) (limited to 'Game/Code/lib/ffmpeg/rational.pas') diff --git a/Game/Code/lib/ffmpeg/rational.pas b/Game/Code/lib/ffmpeg/rational.pas index 86dbf8a4..14edb799 100644 --- a/Game/Code/lib/ffmpeg/rational.pas +++ b/Game/Code/lib/ffmpeg/rational.pas @@ -16,24 +16,33 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *) -(* This is a part of Pascal porting of ffmpeg. Originally by Victor Zinetz for Delphi and Free Pascal on Windows. -For Mac OS X, some modifications were made by The Creative CAT, denoted as CAT -in the source codes *) + +(* This is a part of Pascal porting of ffmpeg. + * Originally by Victor Zinetz for Delphi and Free Pascal on Windows. + * For Mac OS X, some modifications were made by The Creative CAT, denoted as CAT + * in the source codes *) + +// Revision: 10765 unit rational; + {$IFDEF FPC} - {$MODE DELPHI} (* CAT *) - {$PACKENUM 4} (* every enum type variables uses 4 bytes, CAT *) - {$PACKRECORDS C} (* GCC compatible, Record Packing, CAT *) + {$MODE DELPHI} + {$PACKENUM 4} (* use 4-byte enums *) + {$PACKRECORDS C} (* C/C++-compatible record packing *) +{$ELSE} + {$MINENUMSIZE 4} (* use 4-byte enums *) {$ENDIF} -interface (* unit windows is deleted by CAT *) +interface -{$I version.inc} +uses + UConfig; type (* - * Rational number num/den. *) + * Rational number num/den. + *) PAVRational = ^TAVRational; TAVRational = record num: integer; ///< numerator @@ -41,32 +50,75 @@ type end; (** - * returns 0 if a==b, 1 if a>b and -1 if ab and -1 if a 0 then Result := (tmp shr 63) or 1 (* fixed by CAT *) - else Result := 0 + if (tmp <> 0) then + Result := (tmp shr 63) or 1 + else + Result := 0 end; function av_q2d(a: TAVRational): double; -- cgit v1.2.3