Commit 7d723b44 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Attempt to fix crashes on the extended panel.

parent 5dd166ae
...@@ -941,7 +941,7 @@ void Equalizer::setBand() ...@@ -941,7 +941,7 @@ void Equalizer::setBand()
for( int i = 0 ; i< BANDS ; i++ ) for( int i = 0 ; i< BANDS ; i++ )
{ {
char psz_val[5]; char psz_val[8];
float f_val = ( float )( bands[i]->value() ) / 10 - 20 ; float f_val = ( float )( bands[i]->value() ) / 10 - 20 ;
sprintf( psz_values, "%s %f", psz_values, f_val ); sprintf( psz_values, "%s %f", psz_values, f_val );
sprintf( psz_val, "% 5.1f", f_val ); sprintf( psz_val, "% 5.1f", f_val );
...@@ -962,9 +962,9 @@ void Equalizer::setValues( char *psz_bands, float f_preamp ) ...@@ -962,9 +962,9 @@ void Equalizer::setValues( char *psz_bands, float f_preamp )
char *p = psz_bands; char *p = psz_bands;
if ( p ) if ( p )
{ {
for( int i = 0; i < 10; i++ ) for( int i = 0; i < BANDS; i++ )
{ {
char psz_val[5]; char psz_val[8];
float f = strtof( p, &p ); float f = strtof( p, &p );
int i_val= ( int )( ( f + 20 ) * 10 ); int i_val= ( int )( ( f + 20 ) * 10 );
bands[i]->setValue( i_val ); bands[i]->setValue( i_val );
...@@ -989,9 +989,14 @@ void Equalizer::setPreset( int preset ) ...@@ -989,9 +989,14 @@ void Equalizer::setPreset( int preset )
VLC_OBJECT_AOUT, FIND_ANYWHERE ); VLC_OBJECT_AOUT, FIND_ANYWHERE );
char psz_values[102]; memset( psz_values, 0, 102 ); char psz_values[102]; memset( psz_values, 0, 102 );
for( int i = 0 ; i< 10 ;i++ ) char psz_values2[102];memset( psz_values2, 0, 102 );
sprintf( psz_values, "%s %.1f", psz_values, for( int i = 0 ; i< BANDS ;i++ )
eqz_preset_10b[preset]->f_amp[i] ); {
strcpy( psz_values2, psz_values );
sprintf( psz_values, "%s %5.1f",
psz_values2, eqz_preset_10b[preset]->f_amp[i] );
}
if( p_aout ) if( p_aout )
{ {
......
...@@ -41,6 +41,8 @@ ExtendedDialog::ExtendedDialog( intf_thread_t *_p_intf ): QVLCFrame( _p_intf ) ...@@ -41,6 +41,8 @@ ExtendedDialog::ExtendedDialog( intf_thread_t *_p_intf ): QVLCFrame( _p_intf )
setWindowTitle( qtr( "Adjustments and Effects" ) ); setWindowTitle( qtr( "Adjustments and Effects" ) );
QGridLayout *layout = new QGridLayout( this ); QGridLayout *layout = new QGridLayout( this );
layout->setLayoutMargins( 0, 2, 0, 1, 1 );
layout->setSpacing( 3 );
QTabWidget *mainTabW = new QTabWidget( this ); QTabWidget *mainTabW = new QTabWidget( this );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment