diff options
author | wm4 <wm4@nowhere> | 2013-12-03 23:42:49 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-12-04 00:07:40 +0100 |
commit | 0d5e4ba7991cad632bde45790bd52b77b856d3a5 (patch) | |
tree | 293d670907b8707a0b6df83fd9ca155ae368e49e /video/filter | |
parent | fabfb23232799c54019de76a4f1fb33d4adef97e (diff) | |
download | mpv-0d5e4ba7991cad632bde45790bd52b77b856d3a5.tar.bz2 mpv-0d5e4ba7991cad632bde45790bd52b77b856d3a5.tar.xz |
vf_rotate: use option parser
Diffstat (limited to 'video/filter')
-rw-r--r-- | video/filter/vf_rotate.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/video/filter/vf_rotate.c b/video/filter/vf_rotate.c index 58cac932ff..69f5b30d96 100644 --- a/video/filter/vf_rotate.c +++ b/video/filter/vf_rotate.c @@ -23,6 +23,7 @@ #include "config.h" #include "mpvcore/mp_msg.h" +#include "mpvcore/m_option.h" #include "video/img_format.h" #include "video/mp_image.h" @@ -119,15 +120,19 @@ static int vf_open(vf_instance_t *vf, char *args){ vf->reconfig=reconfig; vf->filter=filter; vf->query_format=query_format; - vf->priv=malloc(sizeof(struct vf_priv_s)); - vf->priv->direction=args?atoi(args):0; return 1; } +#define OPT_BASE_STRUCT struct vf_priv_s const vf_info_t vf_info_rotate = { .description = "rotate", .name = "rotate", .open = vf_open, + .priv_size = sizeof(struct vf_priv_s), + .options = (const struct m_option[]){ + OPT_INTRANGE("direction", direction, 0, 0, 7), + {0} + }, }; //===========================================================================// |