[vlc-devel] [PATCH 5/7] opencv_wrapper: Simplify logic slightly

Edward Wang edward.c.wang at compdigitec.com
Fri Aug 10 04:05:57 CEST 2012


---
 modules/video_filter/opencv_wrapper.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/modules/video_filter/opencv_wrapper.c b/modules/video_filter/opencv_wrapper.c
index b3d2762..2d0e865 100644
--- a/modules/video_filter/opencv_wrapper.c
+++ b/modules/video_filter/opencv_wrapper.c
@@ -446,6 +446,7 @@ static picture_t* Filter( filter_t* p_filter, picture_t* p_pic )
     }
 
     ReleaseImages( p_filter );
+    picture_Release( p_pic );
 
 #ifndef NDEBUG
     //calculate duration
@@ -455,13 +456,9 @@ static picture_t* Filter( filter_t* p_filter, picture_t* p_pic )
     msg_Dbg( p_filter, "Filter took %2.4f seconds", duration );
 #endif
 
-    if( p_filter->p_sys->i_wrapper_output == VINPUT ) {
-        picture_Release( p_pic );
-        return p_outpic;
-    } else if( p_filter->p_sys->i_wrapper_output == PROCESSED ) {
+    if( p_filter->p_sys->i_wrapper_output != NONE ) {
         return p_outpic;
     } else { // NONE
-        picture_Release( p_pic );
         picture_Release( p_outpic );
         return NULL;
     }
-- 
1.7.5.4




More information about the vlc-devel mailing list