Qt: force positive values for width && height when transcoding
authorJean-Baptiste Kempf <jb@videolan.org>
Thu, 30 Apr 2009 22:48:59 +0000 (00:48 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Thu, 30 Apr 2009 22:50:41 +0000 (00:50 +0200)
modules/gui/qt4/components/sout/profile_selector.cpp

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