mirror of
https://github.com/mpv-player/mpv
synced 2025-01-12 18:02:36 +00:00
video/filter: remove unneeded config callbacks
They didn't do anything. vf_screenshot.c actually did release the previous image, but that's not really required. At worst you could take a screenshot and get an old frame when there's no new frame yet.
This commit is contained in:
parent
66e20ef8ad
commit
2d0a9c7af0
@ -166,13 +166,6 @@ static void do_delogo(uint8_t *dst, uint8_t *src, int dstStride, int srcStride,
|
||||
}
|
||||
}
|
||||
|
||||
static int config(struct vf_instance *vf,
|
||||
int width, int height, int d_width, int d_height,
|
||||
unsigned int flags, unsigned int outfmt){
|
||||
|
||||
return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt);
|
||||
}
|
||||
|
||||
static struct mp_image *filter(struct vf_instance *vf, struct mp_image *mpi)
|
||||
{
|
||||
struct mp_image *dmpi = mpi;
|
||||
@ -282,7 +275,6 @@ load_error:
|
||||
|
||||
static int vf_open(vf_instance_t *vf){
|
||||
struct vf_priv_s *p = vf->priv;
|
||||
vf->config=config;
|
||||
vf->filter=filter;
|
||||
vf->query_format=query_format;
|
||||
|
||||
|
@ -28,15 +28,6 @@
|
||||
|
||||
#include "video/out/vo.h"
|
||||
|
||||
//===========================================================================//
|
||||
|
||||
static int config(struct vf_instance *vf, int width, int height,
|
||||
int d_width, int d_height,
|
||||
unsigned int flags, unsigned int outfmt)
|
||||
{
|
||||
return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt);
|
||||
}
|
||||
|
||||
static struct mp_image *filter(struct vf_instance *vf, struct mp_image *mpi)
|
||||
{
|
||||
mp_image_vflip(mpi);
|
||||
@ -51,7 +42,6 @@ static int query_format(struct vf_instance *vf, unsigned int fmt)
|
||||
}
|
||||
|
||||
static int vf_open(vf_instance_t *vf){
|
||||
vf->config=config;
|
||||
vf->filter=filter;
|
||||
vf->query_format = query_format;
|
||||
return 1;
|
||||
@ -62,5 +52,3 @@ const vf_info_t vf_info_flip = {
|
||||
.name = "flip",
|
||||
.open = vf_open,
|
||||
};
|
||||
|
||||
//===========================================================================//
|
||||
|
@ -324,13 +324,6 @@ static void donoise(uint8_t *dst, uint8_t *src, int dstStride, int srcStride, in
|
||||
if (fp->shiftptr == 3) fp->shiftptr = 0;
|
||||
}
|
||||
|
||||
static int config(struct vf_instance *vf,
|
||||
int width, int height, int d_width, int d_height,
|
||||
unsigned int flags, unsigned int outfmt){
|
||||
|
||||
return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt);
|
||||
}
|
||||
|
||||
static struct mp_image *filter(struct vf_instance *vf, struct mp_image *mpi)
|
||||
{
|
||||
struct mp_image *dmpi = mpi;
|
||||
@ -393,7 +386,6 @@ static const unsigned int fmt_list[]={
|
||||
};
|
||||
|
||||
static int vf_open(vf_instance_t *vf){
|
||||
vf->config=config;
|
||||
vf->filter=filter;
|
||||
vf->query_format=query_format;
|
||||
vf->uninit=uninit;
|
||||
|
@ -36,14 +36,6 @@ struct vf_priv_s {
|
||||
struct mp_image *current;
|
||||
};
|
||||
|
||||
static int config(struct vf_instance *vf,
|
||||
int width, int height, int d_width, int d_height,
|
||||
unsigned int flags, unsigned int outfmt)
|
||||
{
|
||||
mp_image_unrefp(&vf->priv->current);
|
||||
return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt);
|
||||
}
|
||||
|
||||
static struct mp_image *filter(struct vf_instance *vf, struct mp_image *mpi)
|
||||
{
|
||||
mp_image_unrefp(&vf->priv->current);
|
||||
@ -70,7 +62,6 @@ static int query_format(struct vf_instance *vf, unsigned int fmt)
|
||||
|
||||
static int vf_open(vf_instance_t *vf)
|
||||
{
|
||||
vf->config = config;
|
||||
vf->control = control;
|
||||
vf->filter = filter;
|
||||
vf->query_format = query_format;
|
||||
|
@ -116,13 +116,6 @@ static int filter(struct vf_instance *vf, struct mp_image *mpi)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int config(struct vf_instance *vf,
|
||||
int width, int height, int d_width, int d_height,
|
||||
unsigned int flags, unsigned int outfmt)
|
||||
{
|
||||
return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt);
|
||||
}
|
||||
|
||||
static int control(vf_instance_t *vf, int request, void *data)
|
||||
{
|
||||
switch (request) {
|
||||
@ -151,7 +144,6 @@ static int query_format(struct vf_instance *vf, unsigned int fmt)
|
||||
|
||||
static int vf_open(vf_instance_t *vf)
|
||||
{
|
||||
vf->config = config;
|
||||
vf->filter_ext = filter;
|
||||
vf->control = control;
|
||||
vf->uninit = uninit;
|
||||
|
Loading…
Reference in New Issue
Block a user