[vlc-devel] [PATCH 1/2] avcommon.h: move code around
Jean-Baptiste Kempf
jb at videolan.org
Wed Dec 18 20:16:40 CET 2013
LGTM.
Not sure why you need review for that :)
On 18 Dec, Rafaël Carré wrote :
> ---
> modules/codec/avcodec/avcommon.h | 46 ++++++++++++++++++++--------------------
> 1 file changed, 23 insertions(+), 23 deletions(-)
>
> diff --git a/modules/codec/avcodec/avcommon.h b/modules/codec/avcodec/avcommon.h
> index dfd753e..293755b 100644
> --- a/modules/codec/avcodec/avcommon.h
> +++ b/modules/codec/avcodec/avcommon.h
> @@ -37,6 +37,29 @@
> #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
> --
> 1.8.5.2
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
--
With my kindest regards,
--
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device
More information about the vlc-devel
mailing list