mirror of
https://github.com/mpv-player/mpv
synced 2024-12-14 10:55:43 +00:00
232da23dcc
also complains that they are missing. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26731 b3059339-0415-0410-9bf9-f77b7e298cf2
28 lines
514 B
C
28 lines
514 B
C
#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;
|
|
}
|