From 57a3542801f005eac35ea671d3c6356380323dc1 Mon Sep 17 00:00:00 2001 From: michael Date: Sat, 10 May 2008 18:54:10 +0000 Subject: AVOptions support. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26723 b3059339-0415-0410-9bf9-f77b7e298cf2 --- av_opts.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 av_opts.c (limited to 'av_opts.c') diff --git a/av_opts.c b/av_opts.c new file mode 100644 index 0000000000..170bd075e8 --- /dev/null +++ b/av_opts.c @@ -0,0 +1,27 @@ +#include +#include +#include "libavcodec/opt.h" + +int parse_avopts(void *v, char *str){ + char *start; + start= str= strdup(str); + + while(str && *str){ + char *next_opt, *arg; + + next_opt= strchr(str, ','); + if(next_opt) *next_opt++= 0; + + arg = strchr(str, '='); + if(arg) *arg++= 0; + + if(!av_set_string(v, str, arg)){ + free(start); + return -1; + } + str= next_opt; + } + + free(start); + return 0; +} \ No newline at end of file -- cgit v1.2.3