mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-06-19 19:03:00 +02:00
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 <mans@mansr.com>
This commit is contained in:
@@ -23,6 +23,11 @@
|
||||
#include "internal.h"
|
||||
#include "mem.h"
|
||||
|
||||
int av_dict_count(const AVDictionary *m)
|
||||
{
|
||||
return m ? m->count : 0;
|
||||
}
|
||||
|
||||
AVDictionaryEntry *
|
||||
av_dict_get(AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags)
|
||||
{
|
||||
|
||||
@@ -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.
|
||||
*
|
||||
|
||||
+2
-2
@@ -37,8 +37,8 @@
|
||||
*/
|
||||
|
||||
#define LIBAVUTIL_VERSION_MAJOR 51
|
||||
#define LIBAVUTIL_VERSION_MINOR 37
|
||||
#define LIBAVUTIL_VERSION_MICRO 1
|
||||
#define LIBAVUTIL_VERSION_MINOR 38
|
||||
#define LIBAVUTIL_VERSION_MICRO 0
|
||||
|
||||
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
|
||||
LIBAVUTIL_VERSION_MINOR, \
|
||||
|
||||
Reference in New Issue
Block a user