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()
for( int i = 0 ; i< BANDS ; i++ )
{
char psz_val[5];
char psz_val[8];
float f_val = ( float )( bands[i]->value() ) / 10 - 20 ;
sprintf( psz_values, "%s %f", psz_values, f_val );
sprintf( psz_val, "% 5.1f", f_val );
......@@ -962,9 +962,9 @@ void Equalizer::setValues( char *psz_bands, float f_preamp )
char *p = psz_bands;
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 );
int i_val= ( int )( ( f + 20 ) * 10 );
bands[i]->setValue( i_val );
......@@ -989,9 +989,14 @@ void Equalizer::setPreset( int preset )
VLC_OBJECT_AOUT, FIND_ANYWHERE );
char psz_values[102]; memset( psz_values, 0, 102 );
for( int i = 0 ; i< 10 ;i++ )
sprintf( psz_values, "%s %.1f", psz_values,
eqz_preset_10b[preset]->f_amp[i] );
char psz_values2[102];memset( psz_values2, 0, 102 );
for( int i = 0 ; i< BANDS ;i++ )
{
strcpy( psz_values2, psz_values );
sprintf( psz_values, "%s %5.1f",
psz_values2, eqz_preset_10b[preset]->f_amp[i] );
}
if( p_aout )
{
......
......@@ -41,6 +41,8 @@ ExtendedDialog::ExtendedDialog( intf_thread_t *_p_intf ): QVLCFrame( _p_intf )
setWindowTitle( qtr( "Adjustments and Effects" ) );
QGridLayout *layout = new QGridLayout( this );
layout->setLayoutMargins( 0, 2, 0, 1, 1 );
layout->setSpacing( 3 );
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