summaryrefslogtreecommitdiff
path: root/libavutil
diff options
context:
space:
mode:
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/dict.c10
-rw-r--r--libavutil/dict.h8
-rw-r--r--libavutil/internal.h5
-rw-r--r--libavutil/version.h2
4 files changed, 19 insertions, 6 deletions
diff --git a/libavutil/dict.c b/libavutil/dict.c
index 6177ddd335..6d2d8c8dec 100644
--- a/libavutil/dict.c
+++ b/libavutil/dict.c
@@ -23,6 +23,16 @@
#include "internal.h"
#include "mem.h"
+struct AVDictionary {
+ int count;
+ AVDictionaryEntry *elems;
+};
+
+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)
{
diff --git a/libavutil/dict.h b/libavutil/dict.h
index 54ecba0c2d..7f9924b128 100644
--- a/libavutil/dict.h
+++ b/libavutil/dict.h
@@ -93,6 +93,14 @@ 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.
*
* @param pm pointer to a pointer to a dictionary struct. If *pm is NULL
diff --git a/libavutil/internal.h b/libavutil/internal.h
index c56aca6d07..a966e18dc3 100644
--- a/libavutil/internal.h
+++ b/libavutil/internal.h
@@ -40,11 +40,6 @@
#include "cpu.h"
#include "dict.h"
-struct AVDictionary {
- int count;
- AVDictionaryEntry *elems;
-};
-
#ifndef attribute_align_arg
#if ARCH_X86_32 && AV_GCC_VERSION_AT_LEAST(4,2)
# define attribute_align_arg __attribute__((force_align_arg_pointer))
diff --git a/libavutil/version.h b/libavutil/version.h
index ebc782d77f..6b3e4860e1 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -39,7 +39,7 @@
*/
#define LIBAVUTIL_VERSION_MAJOR 51
-#define LIBAVUTIL_VERSION_MINOR 67
+#define LIBAVUTIL_VERSION_MINOR 68
#define LIBAVUTIL_VERSION_MICRO 100
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \