diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2009-12-13 17:09:41 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2009-12-13 17:09:41 +0000 |
commit | 277c73323733b53dfc8b7288394e5712f440e3eb (patch) | |
tree | a43af67c04c9dd0966667f3b30e5810d5b5bb870 /libavutil/avstring.c | |
parent | 005d9b57ad05acf7e8626467de8774c522182173 (diff) | |
download | ffmpeg-277c73323733b53dfc8b7288394e5712f440e3eb.tar.gz |
Add a function to convert a number to a av_malloced string.
Originally committed as revision 20829 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavutil/avstring.c')
-rw-r--r-- | libavutil/avstring.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavutil/avstring.c b/libavutil/avstring.c index 8ee2a6b12f..b77b1605ab 100644 --- a/libavutil/avstring.c +++ b/libavutil/avstring.c @@ -76,3 +76,9 @@ size_t av_strlcatf(char *dst, size_t size, const char *fmt, ...) return len; } + +char *av_d2str(double d){ + char *str= av_malloc(16); + if(str) snprintf(str, 16, "%f", d); + return str; +} |