]> git.sesse.net Git - vlc/commitdiff
avcommon.h: move code around
authorRafaël Carré <funman@videolan.org>
Wed, 18 Dec 2013 15:04:45 +0000 (16:04 +0100)
committerRafaël Carré <funman@videolan.org>
Thu, 19 Dec 2013 08:04:39 +0000 (09:04 +0100)
modules/codec/avcodec/avcommon.h

index dfd753e9a15c64050e11bcf9b9673027c4809f98..293755b035aafa1c1052ca42c6551f94902b0b45 100644 (file)
 #include "avcommon_compat.h"
 
 
+#ifdef HAVE_LIBAVUTIL_AVUTIL_H
+# include <libavutil/avutil.h>
+# include <libavutil/dict.h>
+
+#define AV_OPTIONS_TEXT     "Advanced options"
+#define AV_OPTIONS_LONGTEXT "Advanced options, in the form {opt=val,opt2=val2}."
+
+static inline AVDictionary *vlc_av_get_options(const char *psz_opts)
+{
+    AVDictionary *options = NULL;
+    config_chain_t *cfg = NULL;
+    config_ChainParseOptions(&cfg, psz_opts);
+    while (cfg) {
+        config_chain_t *next = cfg->p_next;
+        av_dict_set(&options, cfg->psz_name, cfg->psz_value,
+            AV_DICT_DONT_STRDUP_KEY | AV_DICT_DONT_STRDUP_VAL);
+        free(cfg);
+        cfg = next;
+    }
+    return options;
+}
+#endif
+
 unsigned GetVlcDspMask( void );
 
 #ifdef HAVE_LIBAVFORMAT_AVFORMAT_H
@@ -70,27 +93,4 @@ static inline void vlc_init_avcodec(void)
 }
 #endif
 
-#ifdef HAVE_LIBAVUTIL_AVUTIL_H
-# include <libavutil/avutil.h>
-# include <libavutil/dict.h>
-
-#define AV_OPTIONS_TEXT     "Advanced options"
-#define AV_OPTIONS_LONGTEXT "Advanced options, in the form {opt=val,opt2=val2}."
-
-static inline AVDictionary *vlc_av_get_options(const char *psz_opts)
-{
-    AVDictionary *options = NULL;
-    config_chain_t *cfg = NULL;
-    config_ChainParseOptions(&cfg, psz_opts);
-    while (cfg) {
-        config_chain_t *next = cfg->p_next;
-        av_dict_set(&options, cfg->psz_name, cfg->psz_value,
-            AV_DICT_DONT_STRDUP_KEY | AV_DICT_DONT_STRDUP_VAL);
-        free(cfg);
-        cfg = next;
-    }
-    return options;
-}
-#endif
-
 #endif