aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ffmpeg-2.2/rational.pas
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/ffmpeg-2.2/rational.pas')
-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.