summaryrefslogtreecommitdiff
path: root/libavcodec/opt.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2005-09-06 21:32:18 +0000
committerMichael Niedermayer <michaelni@gmx.at>2005-09-06 21:32:18 +0000
commit3735e82f2d2687c083d1fc9c6c276328cedb9895 (patch)
tree40e92714eda50ec38135ad8dc106d5a33b00047b /libavcodec/opt.c
parent79396ac68573628f3b59142601db86a0f4ba7ad5 (diff)
AVOption enumeration support and some flags to classify AVOptions
Originally committed as revision 4568 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/opt.c')
-rw-r--r--libavcodec/opt.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/opt.c b/libavcodec/opt.c
index 4d49570930..f273c1607b 100644
--- a/libavcodec/opt.c
+++ b/libavcodec/opt.c
@@ -46,6 +46,12 @@ static AVOption *find_opt(void *v, const char *name){
return NULL;
}
+AVOption *av_next_option(void *obj, AVOption *last){
+ if(last && last[1].name) return ++last;
+ else if(last) return NULL;
+ else return (*(AVClass**)obj)->option;
+}
+
static int av_set_number(void *obj, const char *name, double num, int den, int64_t intnum){
AVOption *o= find_opt(obj, name);
void *dst;