[vlc-commits] upnp: Reduce variables scope

Hugo Beauzée-Luyssen git at videolan.org
Thu Jan 28 13:11:36 CET 2016


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Thu Jan 28 12:27:27 2016 +0100| [a1efb1a951f93abeb888210c96ea8e5c10beb8d2] | committer: Hugo Beauzée-Luyssen

upnp: Reduce variables scope

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

 modules/services_discovery/upnp.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/services_discovery/upnp.cpp b/modules/services_discovery/upnp.cpp
index 7aa2e52..6d78945 100644
--- a/modules/services_discovery/upnp.cpp
+++ b/modules/services_discovery/upnp.cpp
@@ -945,7 +945,6 @@ input_item_t* MediaServer::getNextItem()
             if ( p_resource_list && ixmlNodeList_length( p_resource_list ) > 0 )
             {
                 mtime_t i_duration = -1;
-                int i_hours, i_minutes, i_seconds;
                 IXML_Element* p_resource = ( IXML_Element* ) ixmlNodeList_item( p_resource_list, 0 );
                 const char* psz_resource_url = xml_getChildElementValue( p_resource, "res" );
                 if( !psz_resource_url )
@@ -954,6 +953,7 @@ input_item_t* MediaServer::getNextItem()
 
                 if ( psz_duration )
                 {
+                    int i_hours, i_minutes, i_seconds;
                     if( sscanf( psz_duration, "%d:%02d:%02d",
                         &i_hours, &i_minutes, &i_seconds ) )
                         i_duration = INT64_C(1000000) * ( i_hours*3600 +



More information about the vlc-commits mailing list