Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Diff of /ffserver.c [084ecc] .. [f0283c] Maximize Restore

  Switch to unified view

a/ffserver.c b/ffserver.c
...
...
1187
            *q++ = *p;
1187
            *q++ = *p;
1188
        p++;
1188
        p++;
1189
    }
1189
    }
1190
    if (buf_size > 0)
1190
    if (buf_size > 0)
1191
        *q = '\0';
1191
        *q = '\0';
1192
    *pp = p;
1193
}
1194
1195
static void get_arg(char *buf, int buf_size, const char **pp)
1196
{
1197
    const char *p;
1198
    char *q;
1199
    int quote;
1200
1201
    p = *pp;
1202
    while (isspace(*p)) p++;
1203
    q = buf;
1204
    quote = 0;
1205
    if (*p == '\"' || *p == '\'')
1206
        quote = *p++;
1207
    for(;;) {
1208
        if (quote) {
1209
            if (*p == quote)
1210
                break;
1211
        } else {
1212
            if (isspace(*p))
1213
                break;
1214
        }
1215
        if (*p == '\0')
1216
            break;
1217
        if ((q - buf) < buf_size - 1)
1218
            *q++ = *p;
1219
        p++;
1220
    }
1221
    *q = '\0';
1222
    if (quote && *p == quote)
1223
        p++;
1192
    *pp = p;
1224
    *pp = p;
1193
}
1225
}
1194
1226
1195
static int validate_acl(FFStream *stream, HTTPContext *c)
1227
static int validate_acl(FFStream *stream, HTTPContext *c)
1196
{
1228
{
...
...
3618
        }
3650
        }
3619
        stream->bandwidth = (bandwidth + 999) / 1000;
3651
        stream->bandwidth = (bandwidth + 999) / 1000;
3620
    }
3652
    }
3621
}
3653
}
3622
3654
3623
static void get_arg(char *buf, int buf_size, const char **pp)
3624
{
3625
    const char *p;
3626
    char *q;
3627
    int quote;
3628
3629
    p = *pp;
3630
    while (isspace(*p)) p++;
3631
    q = buf;
3632
    quote = 0;
3633
    if (*p == '\"' || *p == '\'')
3634
        quote = *p++;
3635
    for(;;) {
3636
        if (quote) {
3637
            if (*p == quote)
3638
                break;
3639
        } else {
3640
            if (isspace(*p))
3641
                break;
3642
        }
3643
        if (*p == '\0')
3644
            break;
3645
        if ((q - buf) < buf_size - 1)
3646
            *q++ = *p;
3647
        p++;
3648
    }
3649
    *q = '\0';
3650
    if (quote && *p == quote)
3651
        p++;
3652
    *pp = p;
3653
}
3654
3655
/* add a codec and set the default parameters */
3655
/* add a codec and set the default parameters */
3656
static void add_codec(FFStream *stream, AVCodecContext *av)
3656
static void add_codec(FFStream *stream, AVCodecContext *av)
3657
{
3657
{
3658
    AVStream *st;
3658
    AVStream *st;
3659
3659