[MPlayer-cvslog] r36852 - trunk/libmpcodecs/vf_screenshot.c
reimar
subversion at mplayerhq.hu
Sun Feb 16 15:47:35 CET 2014
Author: reimar
Date: Sun Feb 16 15:47:35 2014
New Revision: 36852
Log:
vf_screenshot: Simplify repeat screenshot handling logic.
Modified:
trunk/libmpcodecs/vf_screenshot.c
Modified: trunk/libmpcodecs/vf_screenshot.c
==============================================================================
--- trunk/libmpcodecs/vf_screenshot.c Sun Feb 16 15:47:33 2014 (r36851)
+++ trunk/libmpcodecs/vf_screenshot.c Sun Feb 16 15:47:35 2014 (r36852)
@@ -198,8 +198,7 @@ static int put_image(struct vf_instance
}
if(vf->priv->shot) {
- if (vf->priv->shot==1)
- vf->priv->shot=0;
+ vf->priv->shot &= ~1;
gen_fname(vf->priv);
if (vf->priv->fname[0]) {
if (!vf->priv->store_slices)
@@ -220,13 +219,9 @@ static int control (vf_instance_t *vf, i
**/
if(request==VFCTRL_SCREENSHOT) {
if (data && *(int*)data) { // repeated screenshot mode
- if (vf->priv->shot==2)
- vf->priv->shot=0;
- else
- vf->priv->shot=2;
+ vf->priv->shot ^= 2;
} else { // single screenshot
- if (!vf->priv->shot)
- vf->priv->shot=1;
+ vf->priv->shot |= 1;
}
return CONTROL_TRUE;
}
More information about the MPlayer-cvslog
mailing list