changeset 35041:f674ec17b65b

Fix usage count for passthrough-only filters.
author reimar
date Fri, 31 Aug 2012 20:09:30 +0000
parents 560a69dffd71
children d89db56bc91b
files libmpcodecs/vf.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vf.c	Fri Aug 31 20:08:44 2012 +0000
+++ b/libmpcodecs/vf.c	Fri Aug 31 20:09:30 2012 +0000
@@ -296,7 +296,9 @@
 
   if(vf->put_image==vf_next_put_image){
       // passthru mode, if the filter uses the fallback/default put_image() code
-      return vf_get_image(vf->next,outfmt,mp_imgtype,mp_imgflag,w,h);
+      mpi = vf_get_image(vf->next,outfmt,mp_imgtype,mp_imgflag,w,h);
+      mpi->usage_count++;
+      return mpi;
   }
 
   // Note: we should call libvo first to check if it supports direct rendering