[MPlayer-cvslog] r34971 - in trunk/libmpcodecs: vf.c vf_ass.c vf_expand.c

reimar subversion at mplayerhq.hu
Fri May 25 22:31:11 CEST 2012


Author: reimar
Date: Fri May 25 22:31:11 2012
New Revision: 34971

Log:
Move decrementing usage count to a common place.

This should work for most filters without having to check
and change each one.

Modified:
   trunk/libmpcodecs/vf.c
   trunk/libmpcodecs/vf_ass.c
   trunk/libmpcodecs/vf_expand.c

Modified: trunk/libmpcodecs/vf.c
==============================================================================
--- trunk/libmpcodecs/vf.c	Fri May 25 22:31:10 2012	(r34970)
+++ trunk/libmpcodecs/vf.c	Fri May 25 22:31:11 2012	(r34971)
@@ -692,6 +692,7 @@ int vf_next_query_format(struct vf_insta
 }
 
 int vf_next_put_image(struct vf_instance *vf,mp_image_t *mpi, double pts){
+    mpi->usage_count--;
     return vf->next->put_image(vf->next,mpi, pts);
 }
 

Modified: trunk/libmpcodecs/vf_ass.c
==============================================================================
--- trunk/libmpcodecs/vf_ass.c	Fri May 25 22:31:10 2012	(r34970)
+++ trunk/libmpcodecs/vf_ass.c	Fri May 25 22:31:11 2012	(r34971)
@@ -169,8 +169,6 @@ static int prepare_image(struct vf_insta
             mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_MPCODECS_FunWhydowegetNULL);
             return 0;
         }
-        // allow reusing it after this processing
-        vf->dmpi->usage_count--;
         mpi->priv = NULL;
         // we've used DR, so we're ready...
         if (ass_top_margin)

Modified: trunk/libmpcodecs/vf_expand.c
==============================================================================
--- trunk/libmpcodecs/vf_expand.c	Fri May 25 22:31:10 2012	(r34970)
+++ trunk/libmpcodecs/vf_expand.c	Fri May 25 22:31:11 2012	(r34971)
@@ -415,7 +415,6 @@ static int put_image(struct vf_instance 
     if(mpi->flags&MP_IMGFLAG_DIRECT || mpi->flags&MP_IMGFLAG_DRAW_CALLBACK){
 	vf->dmpi=mpi->priv;
 	if(!vf->dmpi) { mp_msg(MSGT_VFILTER, MSGL_WARN, MSGTR_MPCODECS_FunWhydowegetNULL); return 0; }
-	vf->dmpi->usage_count--;
 	mpi->priv=NULL;
 #ifdef OSD_SUPPORT
 	if(vf->priv->osd) draw_osd(vf,mpi->w,mpi->h);


More information about the MPlayer-cvslog mailing list