[vlc-devel] [PATCH] video_filter/logo: remove usage of abort
Filip Roséen
filip at videolabs.io
Sun Jun 5 17:08:37 CEST 2016
---
modules/video_filter/logo.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/modules/video_filter/logo.c b/modules/video_filter/logo.c
index 8dcd2b1..c17dc1b 100644
--- a/modules/video_filter/logo.c
+++ b/modules/video_filter/logo.c
@@ -653,8 +653,9 @@ static void LogoListLoad( vlc_object_t *p_this, logo_list_t *p_logo_list,
p_logo_list->i_next_pic = 0;
psz_original = psz_list = strdup( psz_filename );
+
if( !psz_list )
- abort();
+ return;
/* Count the number logos == number of ';' + 1 */
p_logo_list->i_count = 1;
@@ -666,8 +667,12 @@ static void LogoListLoad( vlc_object_t *p_this, logo_list_t *p_logo_list,
p_logo_list->p_logo =
p_logo = calloc( p_logo_list->i_count, sizeof(*p_logo) );
+
if( !p_logo )
- abort();
+ {
+ free( psz_list );
+ return;
+ }
/* Fill the data */
for( unsigned i = 0; i < p_logo_list->i_count; i++ )
--
2.8.3
More information about the vlc-devel
mailing list