[vlc-commits] caf: simplify error handling
Rémi Denis-Courmont
git at videolan.org
Thu May 3 18:39:01 CEST 2018
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu May 3 19:36:32 2018 +0300| [311397e1bfa70fbebff505cb5d6c7b592b51ee4d] | committer: Rémi Denis-Courmont
caf: simplify error handling
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=311397e1bfa70fbebff505cb5d6c7b592b51ee4d
---
modules/demux/caf.c | 18 ++++++------------
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/modules/demux/caf.c b/modules/demux/caf.c
index 78eaa22e2e..7fa909dac6 100644
--- a/modules/demux/caf.c
+++ b/modules/demux/caf.c
@@ -903,19 +903,13 @@ static int Open( vlc_object_t *p_this )
goto caf_open_end;
}
-caf_open_end:
-
- if( i_error )
- {
- es_format_Clean( &p_sys->fmt );
- free( p_sys );
- }
- else
- {
- p_demux->pf_control = Control;
- p_demux->pf_demux = Demux;
- }
+ p_demux->pf_control = Control;
+ p_demux->pf_demux = Demux;
+ return VLC_SUCCESS;
+caf_open_end:
+ es_format_Clean( &p_sys->fmt );
+ free( p_sys );
return i_error;
}
More information about the vlc-commits
mailing list