]> git.sesse.net Git - vlc/commitdiff
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 af61d307cb3d82ca7ce1899591691763cbc830cb..7d4591c76b21151f7a0374b088a967084141c01d 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() );
             }
         }