From 987170cb9dd036d3372c8feac6074d13d1b84dd2 Mon Sep 17 00:00:00 2001 From: Mans Rullgard Date: Wed, 8 Aug 2012 17:30:15 +0100 Subject: dict: add av_dict_count() This adds a function to retrieve the number of entries in a dictionary and updates the places directly accessing what should be an opaque struct to use this new function instead. Signed-off-by: Mans Rullgard --- libavutil/dict.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'libavutil/dict.h') diff --git a/libavutil/dict.h b/libavutil/dict.h index aa07626535..72d1e9d25b 100644 --- a/libavutil/dict.h +++ b/libavutil/dict.h @@ -86,6 +86,14 @@ typedef struct AVDictionary AVDictionary; AVDictionaryEntry * av_dict_get(AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags); +/** + * Get number of entries in dictionary. + * + * @param m dictionary + * @return number of entries in dictionary + */ +int av_dict_count(const AVDictionary *m); + /** * Set the given entry in *pm, overwriting an existing entry. * -- cgit v1.2.3