/* add option to url of the form: " */
static void url_add_option(char *buf, int buf_size, const char *fmt,...)
/* add option to url of the form: " */
static void url_add_option(char *buf, int buf_size, const char *fmt,...)
{
    char buf1[1024];
    va_list ap;
    va_start(ap, fmt);
    if (strchr(buf, '?'))
        av_strlcat(buf, "&", buf_size);
    else
        av_strlcat(buf, "?", buf_size);
    vsnprintf(buf1, sizeof(buf1), fmt, ap);
    av_strlcat(buf, buf1, buf_size);
    va_end(ap);
}