func: void parse_options(void *optctx,int argc,char **argv,const OptionDef *options,void (*parse_arg_function)(void *, const char *)) const char * opt ; int optindex ; int handleoptions = 1 ; int ret ; optindex = 1; while ( optindex < argc )  opt = argv [ optindex ++ ]; if ( handleoptions && opt [ 0 ] == '-' && opt [ 1 ] != '\0' )  if ( opt [ 1 ] == '-' && opt [ 2 ] == '\0' )  handleoptions = 0; opt ++; if ( ( ret = parse_option ( optctx , opt , argv [ optindex ] , options ) ) < 0 )  optindex += ret; int parse_option(void *optctx,const char *opt,const char *arg,const OptionDef *options) const OptionDef * po ; int ret ; po = find_option ( options , opt ); static const OptionDef *find_option(const OptionDef *po,const char *name) const char * p = ( strchr ( name , ':' ) ) ; int len = ( p ? ( p - name ) : strlen ( name ) ) ; while ( po -> name != ( ( void * ) 0 ) )  if ( ! strncmp ( name , po -> name , len ) && strlen ( po -> name ) == len )  po ++; return po ; if ( ! po -> name && opt [ 0 ] == 'n' && opt [ 1 ] == 'o' )  po = find_option ( options , opt + 2 ); static const OptionDef *find_option(const OptionDef *po,const char *name) const char * p = ( strchr ( name , ':' ) ) ; int len = ( p ? ( p - name ) : strlen ( name ) ) ; while ( po -> name != ( ( void * ) 0 ) )  if ( ! strncmp ( name , po -> name , len ) && strlen ( po -> name ) == len )  po ++; return po ; if ( po -> name && po -> flags & 0x00002 )  arg = "0"; if ( po -> flags & 0x00002 )  arg = "1"; if ( ! po -> name )  po = find_option ( options , "default" ); static const OptionDef *find_option(const OptionDef *po,const char *name) const char * p = ( strchr ( name , ':' ) ) ; int len = ( p ? ( p - name ) : strlen ( name ) ) ; while ( po -> name != ( ( void * ) 0 ) )  if ( ! strncmp ( name , po -> name , len ) && strlen ( po -> name ) == len )  po ++; return po ; if ( ! po -> name )  if ( po -> flags & 0x0001 && ! arg )  ret = write_option ( optctx , po , opt , arg ); static int write_option(void *optctx,const OptionDef *po,const char *opt,const char *arg) void * dst = po -> flags & ( 0x4000 | 0x8000 ) ? ( ( ( uint8_t * ) optctx ) + po -> u . off ) : po -> u . dst_ptr ; int * dstcount ; if ( po -> flags & 0x8000 )  SpecifierOpt * * so = dst ; dstcount = ( ( int * ) ( so + 1 ) ); * so = ( grow_array ( ( * so ) , ( sizeof ( ( * ( * so ) ) ) ) , dstcount , * dstcount + 1 ) ); void *grow_array(void *array,int elem_size,int *size,int new_size) if ( * size < new_size )  uint8_t * tmp = ( av_realloc ( array , ( new_size * elem_size ) ) ) ; memset ( ( tmp + * size * elem_size ) , 0 , ( ( new_size - * size ) * elem_size ) ); 