From 5d0f6603846957f2a73a75f2c79993b92e46a922 Mon Sep 17 00:00:00 2001 From: Tristan Matthews Date: Fri, 1 Aug 2014 00:30:01 -0400 Subject: [PATCH] hds: use else if where appropriate --- modules/stream_filter/hds/hds.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/stream_filter/hds/hds.c b/modules/stream_filter/hds/hds.c index feb0b43f26..edf6159130 100644 --- a/modules/stream_filter/hds/hds.c +++ b/modules/stream_filter/hds/hds.c @@ -1202,12 +1202,12 @@ static int parse_Manifest( stream_t *s ) if( !( medias[media_idx].stream_id = strdup( attr_value ) ) ) return VLC_ENOMEM; } - if( !strcmp(attr_name, "url" ) ) + else if( !strcmp(attr_name, "url" ) ) { if( !( medias[media_idx].media_url = strdup( attr_value ) ) ) return VLC_ENOMEM; } - if( !strcmp(attr_name, "bootstrapInfoId" ) ) + else if( !strcmp(attr_name, "bootstrapInfoId" ) ) { if( !( medias[media_idx].bootstrap_id = strdup( attr_value ) ) ) return VLC_ENOMEM; @@ -1217,7 +1217,7 @@ static int parse_Manifest( stream_t *s ) media_idx++; } - if( type == XML_READER_STARTELEM && ! strcmp( current_element, "bootstrapInfo") ) + else if( type == XML_READER_STARTELEM && ! strcmp( current_element, "bootstrapInfo") ) { while( ( attr_name = xml_ReaderNextAttr( vlc_reader, &attr_value )) ) { @@ -1226,12 +1226,12 @@ static int parse_Manifest( stream_t *s ) if( !( bootstraps[bootstrap_idx].url = strdup( attr_value ) ) ) return VLC_ENOMEM; } - if( !strcmp(attr_name, "id" ) ) + else if( !strcmp(attr_name, "id" ) ) { if( !( bootstraps[bootstrap_idx].id = strdup( attr_value ) ) ) return VLC_ENOMEM; } - if( !strcmp(attr_name, "profile" ) ) + else if( !strcmp(attr_name, "profile" ) ) { if( !( bootstraps[bootstrap_idx].profile = strdup( attr_value ) ) ) return VLC_ENOMEM; @@ -1239,7 +1239,7 @@ static int parse_Manifest( stream_t *s ) } } - if( type == XML_READER_TEXT ) + else if( type == XML_READER_TEXT ) { if( ! strcmp( current_element, "bootstrapInfo" ) ) { @@ -1255,12 +1255,12 @@ static int parse_Manifest( stream_t *s ) msg_Err( (vlc_object_t*) s, "Couldn't decode bootstrap info" ); } } - if( ! strcmp( current_element, "duration" ) ) + else if( ! strcmp( current_element, "duration" ) ) { double shutup_gcc = atof( node ); sys->duration_seconds = (uint64_t) shutup_gcc; } - if( ! strcmp( current_element, "id" ) ) + else if( ! strcmp( current_element, "id" ) ) { if( ! strcmp( element_stack[current_element_idx-1], "manifest" ) ) { -- 2.39.5