static int ftp_file_size(FTPContext *s)

{

    char command[CONTROL_BUFFER_SIZE];

    char *res = NULL;

    const int size_codes[] = {213, 0};



    snprintf(command, sizeof(command), "SIZE %s\r\n", s->path);

    if (ftp_send_command(s, command, size_codes, &res)) {

        s->filesize = strtoll(&res[4], NULL, 10);

    } else {

        s->filesize = -1;

        av_free(res);

        return AVERROR(EIO);

    }



    av_free(res);

    return 0;

}

static int ftp_file_size(FTPContext *s)

{

    char command[CONTROL_BUFFER_SIZE];

    char *res = NULL;

    const int size_codes[] = {213, 0};



    snprintf(command, sizeof(command), "SIZE %s\r\n", s->path);

    if (ftp_send_command(s, command, size_codes, &res)) {

        s->filesize = strtoll(&res[4], NULL, 10);

    } else {

        s->filesize = -1;

        av_free(res);

        return AVERROR(EIO);

    }



    av_free(res);

    return 0;

}

static int FUNC_0(FTPContext *VAR_0)

{

    char VAR_1[CONTROL_BUFFER_SIZE];

    char *VAR_2 = NULL;

    const int VAR_3[] = {213, 0};



    snprintf(VAR_1, sizeof(VAR_1), "SIZE %VAR_0\r\n", VAR_0->path);

    if (ftp_send_command(VAR_0, VAR_1, VAR_3, &VAR_2)) {

        VAR_0->filesize = strtoll(&VAR_2[4], NULL, 10);

    } else {

        VAR_0->filesize = -1;

        av_free(VAR_2);

        return AVERROR(EIO);

    }



    av_free(VAR_2);

    return 0;

}

static int FUNC_0(FTPContext *VAR_0)
{ char VAR_1[CONTROL_BUFFER_SIZE]; char *VAR_2 = NULL; const int VAR_3[] = {213, 0}; snprintf(VAR_1, sizeof(VAR_1), "SIZE %VAR_0\r\n", VAR_0->path); if (ftp_send_command(VAR_0, VAR_1, VAR_3, &VAR_2)) { VAR_0->filesize = strtoll(&VAR_2[4], NULL, 10); } else { VAR_0->filesize = -1; av_free(VAR_2); return AVERROR(EIO); } av_free(VAR_2); return 0; }