aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ffmpeg-2.2/rational.pas
diff options
context:
space:
mode:
authorbrian-ch <brian-ch@b956fd51-792f-4845-bead-9b4dfca2ff2c>2014-06-21 23:39:30 +0000
committerbrian-ch <brian-ch@b956fd51-792f-4845-bead-9b4dfca2ff2c>2014-06-21 23:39:30 +0000
commita420e0f40a864db0897f5c5c47e46ec1446086a3 (patch)
treea5e88a0ce8af29a9eeb89915698985424b6ca08e /src/lib/ffmpeg-2.2/rational.pas
parent4a89698f9faaf96ea496ad11d83aa8c96c799f08 (diff)
downloadusdx-a420e0f40a864db0897f5c5c47e46ec1446086a3.tar.gz
usdx-a420e0f40a864db0897f5c5c47e46ec1446086a3.tar.xz
usdx-a420e0f40a864db0897f5c5c47e46ec1446086a3.zip
Update swresample and rational.pas for ffmpeg 2.2
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@3075 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r--src/lib/ffmpeg-2.2/rational.pas26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/lib/ffmpeg-2.2/rational.pas b/src/lib/ffmpeg-2.2/rational.pas
index 54319362..5795b81f 100644
--- a/src/lib/ffmpeg-2.2/rational.pas
+++ b/src/lib/ffmpeg-2.2/rational.pas
@@ -64,6 +64,26 @@ type
PAVRationalArray = ^TAVRationalArray;
(**
+ * Create a rational.
+ * Useful for compilers that do not support compound literals.
+ * @note The return value is not reduced.
+ */
+static inline AVRational av_make_q(int num, int den)
+{
+ AVRational r = { num, den };
+ return r;
+}
+
+/**)
+
+(**
+ * Create a rational.
+ * Useful for compilers that do not support compound literals.
+ * @note The return value is not reduced.
+ *)
+function av_make_q(num, den: cint): TAVRational; {$IFDEF HasInline}inline;{$ENDIF}
+
+(**
* Compare two rationals.
* @param a first rational
* @param b second rational
@@ -204,4 +224,10 @@ begin
Result.den := q.num;
end;
+function av_make_q(num, den: cint): TAVRational; {$IFDEF HasInline}inline;{$ENDIF}
+begin
+ Result.num := q.num;
+ Result.den := q.den;
+end;
+
end.