static int xvid_ff_2pass_create(xvid_plg_create_t * param,

                                void ** handle) {

    struct xvid_ff_pass1 *x = (struct xvid_ff_pass1 *)param->param;

    char *log = x->context->twopassbuffer;



    /* Do a quick bounds check */

    if( log == NULL )

        return XVID_ERR_FAIL;



    /* We use snprintf() */

    /* This is because we can safely prevent a buffer overflow */

    log[0] = 0;

    snprintf(log, BUFFER_REMAINING(log),

        "# avconv 2-pass log file, using xvid codec\n");

    snprintf(BUFFER_CAT(log), BUFFER_REMAINING(log),

        "# Do not modify. libxvidcore version: %d.%d.%d\n\n",

        XVID_VERSION_MAJOR(XVID_VERSION),

        XVID_VERSION_MINOR(XVID_VERSION),

        XVID_VERSION_PATCH(XVID_VERSION));



    *handle = x->context;

    return 0;

}

static int xvid_ff_2pass_create(xvid_plg_create_t * param,

                                void ** handle) {

    struct xvid_ff_pass1 *x = (struct xvid_ff_pass1 *)param->param;

    char *log = x->context->twopassbuffer;



    

    if( log == NULL )

        return XVID_ERR_FAIL;



    

    

    log[0] = 0;

    snprintf(log, BUFFER_REMAINING(log),

        "# avconv 2-pass log file, using xvid codec\n");

    snprintf(BUFFER_CAT(log), BUFFER_REMAINING(log),

        "# Do not modify. libxvidcore version: %d.%d.%d\n\n",

        XVID_VERSION_MAJOR(XVID_VERSION),

        XVID_VERSION_MINOR(XVID_VERSION),

        XVID_VERSION_PATCH(XVID_VERSION));



    *handle = x->context;

    return 0;

}

static int FUNC_0(xvid_plg_create_t * VAR_0,

                                void ** VAR_1) {

    struct xvid_ff_pass1 *VAR_2 = (struct xvid_ff_pass1 *)VAR_0->VAR_0;

    char *VAR_3 = VAR_2->context->twopassbuffer;



    

    if( VAR_3 == NULL )

        return XVID_ERR_FAIL;



    

    

    VAR_3[0] = 0;

    snprintf(VAR_3, BUFFER_REMAINING(VAR_3),

        "# avconv 2-pass VAR_3 file, using xvid codec\n");

    snprintf(BUFFER_CAT(VAR_3), BUFFER_REMAINING(VAR_3),

        "# Do not modify. libxvidcore version: %d.%d.%d\n\n",

        XVID_VERSION_MAJOR(XVID_VERSION),

        XVID_VERSION_MINOR(XVID_VERSION),

        XVID_VERSION_PATCH(XVID_VERSION));



    *VAR_1 = VAR_2->context;

    return 0;

}

static int FUNC_0(xvid_plg_create_t * VAR_0,
void ** VAR_1) { struct xvid_ff_pass1 *VAR_2 = (struct xvid_ff_pass1 *)VAR_0->VAR_0; char *VAR_3 = VAR_2->context->twopassbuffer; if( VAR_3 == NULL )
return XVID_ERR_FAIL; VAR_3[0] = 0; snprintf(VAR_3, BUFFER_REMAINING(VAR_3),
"# avconv 2-pass VAR_3 file, using xvid codec\n"); snprintf(BUFFER_CAT(VAR_3), BUFFER_REMAINING(VAR_3),
"# Do not modify. libxvidcore version: %d.%d.%d\n\n",
XVID_VERSION_MAJOR(XVID_VERSION),
XVID_VERSION_MINOR(XVID_VERSION),
XVID_VERSION_PATCH(XVID_VERSION)); *VAR_1 = VAR_2->context; return 0; }