summaryrefslogtreecommitdiffstats
path: root/libmpcodecs/vf_crop.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@symbol.nonexistent.invalid>2008-04-24 07:23:15 +0300
committerUoti Urpala <uau@symbol.nonexistent.invalid>2008-04-25 03:34:27 +0300
commitb14909a955259c3b9c3494a5096ceed81397926c (patch)
treef40a07013cfadad52aca1847038370345582b062 /libmpcodecs/vf_crop.c
parent1351b50ea5e12d0b316c0670a525f1a75be3100b (diff)
downloadmpv-b14909a955259c3b9c3494a5096ceed81397926c.tar.bz2
mpv-b14909a955259c3b9c3494a5096ceed81397926c.tar.xz
Move opt_screen_size_[x|y] to options struct
Diffstat (limited to 'libmpcodecs/vf_crop.c')
-rw-r--r--libmpcodecs/vf_crop.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/libmpcodecs/vf_crop.c b/libmpcodecs/vf_crop.c
index 865ecf8d6a..ca14927956 100644
--- a/libmpcodecs/vf_crop.c
+++ b/libmpcodecs/vf_crop.c
@@ -5,6 +5,7 @@
#include "config.h"
#include "mp_msg.h"
#include "help_mp.h"
+#include "options.h"
#include "img_format.h"
#include "mp_image.h"
@@ -21,14 +22,12 @@ static const struct vf_priv_s {
-1,-1
};
-extern int opt_screen_size_x;
-extern int opt_screen_size_y;
-
//===========================================================================//
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;
@@ -61,7 +60,7 @@ static int config(struct vf_instance* vf,
mp_msg(MSGT_VFILTER, MSGL_WARN, MSGTR_MPCODECS_CropBadPositionWidthHeight);
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;
}