Qt: don't set scale, width & height when empty
authorJean-Baptiste Kempf <jb@videolan.org>
Thu, 30 Apr 2009 22:38:49 +0000 (00:38 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Thu, 30 Apr 2009 22:38:49 +0000 (00:38 +0200)
modules/gui/qt4/components/sout/profile_selector.cpp

index f4d1dd2..af61d30 100644 (file)
@@ -184,10 +184,13 @@ void VLCProfileSelector::updateOptions( int i )
             if( options[4] != "none" )
             {
                 smrl.option( "vb", options[5].toInt() );
-                smrl.option( "scale", options[6] );
                 smrl.option( "fps", options[7] );
-                smrl.option( "width", options[8].toInt() );
-                smrl.option( "height", options[9].toInt() );
+                if( !options[6].isEmpty() )
+                    smrl.option( "scale", options[6] );
+                if( !options[8].isEmpty() )
+                    smrl.option( "width", options[8].toInt() );
+                if( !options[9].isEmpty() )
+                    smrl.option( "height", options[9].toInt() );
             }
         }