diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2014-07-31 20:08:19 +0200 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2014-08-16 14:30:18 +0200 |
commit | c2829dc925ffcc2a5934f3e99360a89fb0a3cad5 (patch) | |
tree | 67a20dfc78ed71ef6a54bbababaae6aa364a99b2 /libavutil/dict.h | |
parent | 82e0cb360aaa87a62f731ee3dee500e98bf9d1a6 (diff) | |
download | ffmpeg-c2829dc925ffcc2a5934f3e99360a89fb0a3cad5.tar.gz |
dict.c: Add av_dict_set_int helper function.
This allows getting rid of the many, slightly differing, implementations
of basically the same thing.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Diffstat (limited to 'libavutil/dict.h')
-rw-r--r-- | libavutil/dict.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavutil/dict.h b/libavutil/dict.h index 025d867993..06f1621d45 100644 --- a/libavutil/dict.h +++ b/libavutil/dict.h @@ -31,6 +31,8 @@ #ifndef AVUTIL_DICT_H #define AVUTIL_DICT_H +#include <stdint.h> + #include "version.h" /** @@ -123,6 +125,12 @@ int av_dict_count(const AVDictionary *m); int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags); /** + * Convenience wrapper for av_dict_set that converts the value to a string + * and stores it. + */ +int av_dict_set_int(AVDictionary **pm, const char *key, int64_t value, int flags); + +/** * Parse the key/value pairs list and add the parsed entries to a dictionary. * * In case of failure, all the successfully set entries are stored in |