diff options
author | Zuxy Meng <zuxy.meng@gmail.com> | 2008-03-19 06:17:43 +0000 |
---|---|---|
committer | Zuxy Meng <zuxy.meng@gmail.com> | 2008-03-19 06:17:43 +0000 |
commit | 85074d3c9388123d792995c8f98c9b5d807566b4 (patch) | |
tree | 54440eea962c4864599dd5403fc0244becb24875 /libavutil/rational.h | |
parent | d1928ac1296a09c658ba64fe5c503979e280a2e0 (diff) | |
download | ffmpeg-85074d3c9388123d792995c8f98c9b5d807566b4.tar.gz |
Reapply r12489: Add pure, const and malloc attributes to proper functions
in libavutil.
Fix a compilation failure in r12489.
Originally committed as revision 12498 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavutil/rational.h')
-rw-r--r-- | libavutil/rational.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/libavutil/rational.h b/libavutil/rational.h index f53f278619..2f0017c868 100644 --- a/libavutil/rational.h +++ b/libavutil/rational.h @@ -29,6 +29,7 @@ #define FFMPEG_RATIONAL_H #include <stdint.h> +#include "common.h" /** * Rational number num/den. @@ -78,7 +79,7 @@ int av_reduce(int *dst_nom, int *dst_den, int64_t nom, int64_t den, int64_t max) * @param c second rational. * @return b*c. */ -AVRational av_mul_q(AVRational b, AVRational c); +AVRational av_mul_q(AVRational b, AVRational c) av_const; /** * Divides one rational by another. @@ -86,7 +87,7 @@ AVRational av_mul_q(AVRational b, AVRational c); * @param c second rational. * @return b/c. */ -AVRational av_div_q(AVRational b, AVRational c); +AVRational av_div_q(AVRational b, AVRational c) av_const; /** * Adds two rationals. @@ -94,7 +95,7 @@ AVRational av_div_q(AVRational b, AVRational c); * @param c second rational. * @return b+c. */ -AVRational av_add_q(AVRational b, AVRational c); +AVRational av_add_q(AVRational b, AVRational c) av_const; /** * Subtracts one rational from another. @@ -102,7 +103,7 @@ AVRational av_add_q(AVRational b, AVRational c); * @param c second rational. * @return b-c. */ -AVRational av_sub_q(AVRational b, AVRational c); +AVRational av_sub_q(AVRational b, AVRational c) av_const; /** * Converts a double precision floating point number to a rational. @@ -110,6 +111,6 @@ AVRational av_sub_q(AVRational b, AVRational c); * @param max the maximum allowed numerator and denominator * @return (AVRational) d. */ -AVRational av_d2q(double d, int max); +AVRational av_d2q(double d, int max) av_const; #endif /* FFMPEG_RATIONAL_H */ |