[vlc-devel] [PATCH 5/7] opencv_wrapper: Simplify logic slightly
Edward Wang
edward.c.wang at compdigitec.com
Thu Aug 9 21:19:13 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 b84f770..d1c3aac 100644
--- a/modules/video_filter/opencv_wrapper.c
+++ b/modules/video_filter/opencv_wrapper.c
@@ -439,6 +439,7 @@ static picture_t* Filter( filter_t* p_filter, picture_t* p_pic )
}
ReleaseImages( p_filter );
+ picture_Release( p_pic );
//calculate duration
clock_t finish = clock();
@@ -447,13 +448,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