Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas George <george@nsup.org>2013-12-31 17:07:25 +0400
committerNicolas George <george@nsup.org>2014-01-19 20:12:22 +0400
commit3532dd52c51f3d4b95f31d1b195e64a04a8aea5d (patch)
tree0e02b4f53b0e7df9c1971d1899068314a47af590 /libavutil
parent56072421559342c959de87a402b9d65de598f41e (diff)
lavu/rational: add syntactic sugar.
Add a function to create a rational and macros for common values.
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/rational.h11
-rw-r--r--libavutil/version.h2
2 files changed, 12 insertions, 1 deletions
diff --git a/libavutil/rational.h b/libavutil/rational.h
index b9800ee360..7439701db2 100644
--- a/libavutil/rational.h
+++ b/libavutil/rational.h
@@ -46,6 +46,17 @@ typedef struct AVRational{
} AVRational;
/**
+ * 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;
+}
+
+/**
* Compare two rationals.
* @param a first rational
* @param b second rational
diff --git a/libavutil/version.h b/libavutil/version.h
index 9e4f20281a..1682f89a43 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -56,7 +56,7 @@
*/
#define LIBAVUTIL_VERSION_MAJOR 52
-#define LIBAVUTIL_VERSION_MINOR 62
+#define LIBAVUTIL_VERSION_MINOR 63
#define LIBAVUTIL_VERSION_MICRO 100
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \