avutil: Add av_get_time_base_q()
authorDerek Buitenhuis <derek.buitenhuis@gmail.com>
Tue, 22 Apr 2014 05:26:07 +0000 (07:26 +0200)
committerDerek Buitenhuis <derek.buitenhuis@gmail.com>
Tue, 22 Apr 2014 20:32:35 +0000 (16:32 -0400)
This fixes usage of AV_TIME_BASE_Q in C++ applications, which
cannot use compound literals directly in their code.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
doc/APIchanges
libavutil/avutil.h
libavutil/utils.c
libavutil/version.h

index 05f81b5..e163b56 100644 (file)
@@ -13,6 +13,9 @@ libavutil:     2013-12-xx
 
 API changes, most recent first:
 
+2014-04-xx - xxxxxxx - lavu 53.13.0 - avutil.h
+  Add av_get_time_base_q().
+
 2014-04-xx - xxxxxxx - lavu 53.12.0 - crc.h
   Add AV_CRC_16_ANSI_LE crc variant.
 
index a0d35d1..8c6e571 100644 (file)
@@ -240,6 +240,11 @@ enum AVMediaType {
 #define AV_TIME_BASE_Q          (AVRational){1, AV_TIME_BASE}
 
 /**
+ * Return the fractional representation of the internal time base.
+ */
+AVRational av_get_time_base_q(void);
+
+/**
  * @}
  * @}
  * @defgroup lavu_picture Image related
@@ -273,6 +278,7 @@ char av_get_picture_type_char(enum AVPictureType pict_type);
  */
 
 #include "error.h"
+#include "rational.h"
 #include "version.h"
 #include "macros.h"
 
index 9b18c97..c8c161d 100644 (file)
@@ -53,3 +53,8 @@ char av_get_picture_type_char(enum AVPictureType pict_type)
     default:                 return '?';
     }
 }
+
+AVRational av_get_time_base_q(void)
+{
+    return (AVRational){1, AV_TIME_BASE};
+}
index f32e8d0..9d3e7f3 100644 (file)
@@ -54,7 +54,7 @@
  */
 
 #define LIBAVUTIL_VERSION_MAJOR 53
-#define LIBAVUTIL_VERSION_MINOR 12
+#define LIBAVUTIL_VERSION_MINOR 13
 #define LIBAVUTIL_VERSION_MICRO  0
 
 #define LIBAVUTIL_VERSION_INT   AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \