Mercurial > mplayer.hg
view av_opts.c @ 26698:f6ca559eba53
synced with r26729
author | Gabrov |
---|---|
date | Sun, 11 May 2008 09:30:58 +0000 |
parents | e456af9908f8 |
children | f64717dfd9d5 |
line wrap: on
line source
#include <stdlib.h> #include <string.h> #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; }