1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avutil: Add av_get_time_base_q()

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>
This commit is contained in:
Derek Buitenhuis 2014-04-22 07:26:07 +02:00
parent 6d149d2818
commit dac7e8a94e
4 changed files with 15 additions and 1 deletions

View File

@ -15,6 +15,9 @@ libavutil: 2012-10-22
API changes, most recent first: API changes, most recent first:
2014-04-xx - xxxxxxx - lavu 53.13.0 / 52.78.100 - avutil.h
Add av_get_time_base_q().
2014-04-xx - xxxxxxx - lavu 53.12.0 / 52.77.100 - crc.h 2014-04-xx - xxxxxxx - lavu 53.12.0 / 52.77.100 - crc.h
Add AV_CRC_16_ANSI_LE crc variant. Add AV_CRC_16_ANSI_LE crc variant.

View File

@ -246,6 +246,11 @@ const char *av_get_media_type_string(enum AVMediaType media_type);
#define AV_TIME_BASE_Q (AVRational){1, AV_TIME_BASE} #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);
/** /**
* @} * @}
* @} * @}
@ -282,6 +287,7 @@ char av_get_picture_type_char(enum AVPictureType pict_type);
#include "common.h" #include "common.h"
#include "error.h" #include "error.h"
#include "rational.h"
#include "version.h" #include "version.h"
#include "macros.h" #include "macros.h"
#include "mathematics.h" #include "mathematics.h"

View File

@ -113,3 +113,8 @@ unsigned av_int_list_length_for_size(unsigned elsize,
} }
return i; return i;
} }
AVRational av_get_time_base_q(void)
{
return (AVRational){1, AV_TIME_BASE};
}

View File

@ -56,7 +56,7 @@
*/ */
#define LIBAVUTIL_VERSION_MAJOR 52 #define LIBAVUTIL_VERSION_MAJOR 52
#define LIBAVUTIL_VERSION_MINOR 77 #define LIBAVUTIL_VERSION_MINOR 78
#define LIBAVUTIL_VERSION_MICRO 100 #define LIBAVUTIL_VERSION_MICRO 100
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \