Commit 6c490e5f authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

vout: update "crop" when "crop-{top,bottom,left,right}" is used

This makes sure that the "crop" variable always represents the current
crop settings.
parent 9dd3e8fb
......@@ -561,14 +561,16 @@ static int CropCallback( vlc_object_t *object, char const *cmd,
static int CropBorderCallback(vlc_object_t *object, char const *cmd,
vlc_value_t oldval, vlc_value_t newval, void *data)
{
vout_thread_t *vout = (vout_thread_t *)object;
VLC_UNUSED(cmd); VLC_UNUSED(oldval); VLC_UNUSED(data); VLC_UNUSED(newval);
char buf[4 * 21];
vout_ControlChangeCropBorder(vout,
var_GetInteger(object, "crop-left"),
var_GetInteger(object, "crop-top"),
var_GetInteger(object, "crop-right"),
var_GetInteger(object, "crop-bottom"));
snprintf(buf, sizeof (buf), "%"PRIu64"+%"PRIu64"+%"PRIu64"+%"PRIu64,
var_GetInteger(object, "crop-left"),
var_GetInteger(object, "crop-top"),
var_GetInteger(object, "crop-right"),
var_GetInteger(object, "crop-bottom"));
var_SetString(object, "crop", buf);
VLC_UNUSED(cmd); VLC_UNUSED(oldval); VLC_UNUSED(data); VLC_UNUSED(newval);
return VLC_SUCCESS;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment