Mercurial > mplayer.hg
annotate av_opts.c @ 26699:f64717dfd9d5
Add newlines at end of file, this is required for text files and gcc
also complains that they are missing.
author | reimar |
---|---|
date | Sun, 11 May 2008 10:35:30 +0000 |
parents | e456af9908f8 |
children | 41f8ba327cf5 |
rev | line source |
---|---|
26691 | 1 #include <stdlib.h> |
2 #include <string.h> | |
3 #include "libavcodec/opt.h" | |
4 | |
5 int parse_avopts(void *v, char *str){ | |
6 char *start; | |
7 start= str= strdup(str); | |
8 | |
9 while(str && *str){ | |
10 char *next_opt, *arg; | |
11 | |
12 next_opt= strchr(str, ','); | |
13 if(next_opt) *next_opt++= 0; | |
14 | |
15 arg = strchr(str, '='); | |
16 if(arg) *arg++= 0; | |
17 | |
18 if(!av_set_string(v, str, arg)){ | |
19 free(start); | |
20 return -1; | |
21 } | |
22 str= next_opt; | |
23 } | |
24 | |
25 free(start); | |
26 return 0; | |
26699
f64717dfd9d5
Add newlines at end of file, this is required for text files and gcc
reimar
parents:
26691
diff
changeset
|
27 } |