[vlc-devel] [PATCH] Open Sound Control support using liblo

Rémi Duraffort ivoire at via.ecp.fr
Sun Dec 14 12:31:36 CET 2008


Hello,
Some remarks about your implementation :

1/ "char* psz_from = lo_address_get_url(lo_message_get_source(msg));"
In the documentation you have:
"char* lo_address_get_url( lo_address a )
  Return a URL representing an OSC address.
  Returned value must be free'd."
So your code leaks memory.


2/ "static vlc_object_t *osc_global_this;"
I don't like the use of a static variable. If you can fix this ?


3/ "psz_port = var_CreateGetString( p_intf, "osc-port" );
    if (strlen(psz_port) == 0)"

In case of a problem, var_CreateGetString can return NULL, so strlen can
segfault here. "if( psz_port && *psz_port == '\0' )" may be better.


4/ "lo_server_recv_noblock( p_sys->p_server, i_poll_delay );"
If you can wait properly that's better.


Best regards

-- 
ivoire | Rémi Duraffort



More information about the vlc-devel mailing list