summaryrefslogtreecommitdiffstats
path: root/libmpcodecs/vf_framestep.c
diff options
context:
space:
mode:
authormichael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-06-21 20:52:07 +0000
committermichael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-06-21 20:52:07 +0000
commita8d08eee90e622af7ff3b4ea0245a099e778b9a8 (patch)
tree408a59fde64eebce79097245398969686d5047da /libmpcodecs/vf_framestep.c
parent5dc55f21c176b37c94fb2e12a9b846df94e0188f (diff)
downloadmpv-a8d08eee90e622af7ff3b4ea0245a099e778b9a8.tar.bz2
mpv-a8d08eee90e622af7ff3b4ea0245a099e778b9a8.tar.xz
intercept VFCTRL_FLIP_PAGE if needed
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18781 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs/vf_framestep.c')
-rw-r--r--libmpcodecs/vf_framestep.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libmpcodecs/vf_framestep.c b/libmpcodecs/vf_framestep.c
index b48c5108a4..633e2aaf49 100644
--- a/libmpcodecs/vf_framestep.c
+++ b/libmpcodecs/vf_framestep.c
@@ -73,6 +73,7 @@ struct vf_priv_s {
int frame_step;
/* Only I-Frame (2), print on I-Frame (1) */
int dump_iframe;
+ int last_skip;
};
/* Filter handler */
@@ -108,6 +109,8 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts)
/* Increment current frame */
++priv->frame_cur;
+ priv->last_skip= skip;
+
if (skip == 0) {
/* Get image, export type (we don't modify tghe image) */
dmpi=vf_get_image(vf->next, mpi->imgfmt,
@@ -133,6 +136,13 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts)
return 0;
}
+static int control(struct vf_instance_s* vf, int request, void* data){
+ if(request == VFCTRL_FLIP_PAGE && vf->priv->last_skip){
+ return CONTROL_TRUE;
+ }
+ return vf_next_control(vf,request,data);
+}
+
static void uninit(struct vf_instance_s* vf)
{
/* Free private data */
@@ -145,6 +155,7 @@ static int open(vf_instance_t *vf, char* args)
struct vf_priv_s *p;
vf->put_image = put_image;
+ vf->control= control;
vf->uninit = uninit;
vf->default_reqs = VFCAP_ACCEPT_STRIDE;
vf->priv = p = calloc(1, sizeof(struct vf_priv_s));