[vlc-commits] video_chroma: chain: default return value to error

Ilkka Ollakka git at videolan.org
Sun Feb 5 13:05:29 CET 2017


vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Sun Feb  5 13:37:16 2017 +0200| [e1e5db0d0ed08360471a40182abd392cc4f2f71d] | committer: Ilkka Ollakka

video_chroma: chain: default return value to error

This way we return error also if chain level is reached, previously
we seemed to return VLC_SUCCESS on those cases as i_ret wasn't defined
in that codepath.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e1e5db0d0ed08360471a40182abd392cc4f2f71d
---

 modules/video_chroma/chain.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/modules/video_chroma/chain.c b/modules/video_chroma/chain.c
index 6347d0a..6bc7af3 100644
--- a/modules/video_chroma/chain.c
+++ b/modules/video_chroma/chain.c
@@ -97,7 +97,7 @@ static int Activate( vlc_object_t *p_this )
 {
     filter_t *p_filter = (filter_t *)p_this;
     filter_sys_t *p_sys;
-    int i_ret;
+    int i_ret = VLC_EGENERIC;
 
     const bool b_chroma = p_filter->fmt_in.video.i_chroma != p_filter->fmt_out.video.i_chroma;
     const bool b_resize = p_filter->fmt_in.video.i_width  != p_filter->fmt_out.video.i_width ||
@@ -142,8 +142,6 @@ static int Activate( vlc_object_t *p_this )
         i_ret = BuildChromaResize( p_filter );
     else if( b_chroma )
         i_ret = BuildChromaChain( p_filter );
-    else
-        i_ret = VLC_EGENERIC;
 
     if( i_ret )
     {



More information about the vlc-commits mailing list