summaryrefslogtreecommitdiffstats
path: root/libmpcodecs/vf_crop.c
diff options
context:
space:
mode:
Diffstat (limited to 'libmpcodecs/vf_crop.c')
-rw-r--r--libmpcodecs/vf_crop.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libmpcodecs/vf_crop.c b/libmpcodecs/vf_crop.c
index 20b0228d82..c4e0b4253b 100644
--- a/libmpcodecs/vf_crop.c
+++ b/libmpcodecs/vf_crop.c
@@ -22,11 +22,10 @@
#include "config.h"
#include "mp_msg.h"
-#include "help_mp.h"
+#include "options.h"
#include "img_format.h"
#include "mp_image.h"
-#include "vd.h"
#include "vf.h"
#include "m_option.h"
@@ -45,6 +44,7 @@ static const struct vf_priv_s {
static int config(struct vf_instance *vf,
int width, int height, int d_width, int d_height,
unsigned int flags, unsigned int outfmt){
+ struct MPOpts *opts = vf->opts;
// calculate the missing parameters:
if(vf->priv->crop_w<=0 || vf->priv->crop_w>width) vf->priv->crop_w=width;
if(vf->priv->crop_h<=0 || vf->priv->crop_h>height) vf->priv->crop_h=height;
@@ -74,10 +74,10 @@ static int config(struct vf_instance *vf,
// check:
if(vf->priv->crop_w+vf->priv->crop_x>width ||
vf->priv->crop_h+vf->priv->crop_y>height){
- mp_msg(MSGT_VFILTER, MSGL_WARN, MSGTR_MPCODECS_CropBadPositionWidthHeight);
+ mp_tmsg(MSGT_VFILTER, MSGL_WARN, "[CROP] Bad position/width/height - cropped area outside of the original!\n");
return 0;
}
- if(!opt_screen_size_x && !opt_screen_size_y){
+ if(!opts->screen_size_x && !opts->screen_size_y){
d_width=d_width*vf->priv->crop_w/width;
d_height=d_height*vf->priv->crop_h/height;
}