- fix (?) "mixer bug"

- fix audio_id/video_id changing
- fix some other bug


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8485 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
pontscho 2002-12-16 22:25:17 +00:00
parent 0e14c382cf
commit fcea588a18
4 changed files with 9 additions and 11 deletions

View File

@ -691,7 +691,7 @@ int guiGetEvent( int type,char * arg )
gset( &ao_plugin_cfg.plugin_list,"extrastereo" );
ao_plugin_cfg.pl_extrastereo_mul=gtkAOExtraStereoMul;
}
mixer_device=gtkAOOSSMixer;
mixer_device=gstrdup( gtkAOOSSMixer );
if ( audio_driver_list && !gstrncmp( audio_driver_list[0],"oss",3 ) && gtkAOOSSDevice )
{
char * tmp = calloc( 1,strlen( gtkAOOSSDevice ) + 7 );
@ -713,13 +713,11 @@ int guiGetEvent( int type,char * arg )
// --- misc
if ( gtkCacheOn ) stream_cache_size=gtkCacheSize;
else stream_cache_size=-1;
if ( gtkAutoSyncOn ) autosync=gtkAutoSync;
else autosync=0;
if ( guiIntfStruct.AudioFile ) audio_stream=guiIntfStruct.AudioFile;
else if ( guiIntfStruct.FilenameChanged ) audio_stream=NULL;
if ( guiIntfStruct.AudioFile ) audio_stream=gstrdup( guiIntfStruct.AudioFile );
else if ( guiIntfStruct.FilenameChanged ) gfree( (void**)&audio_stream );
//audio_stream=NULL;
guiIntfStruct.DiskChanged=0;
guiIntfStruct.FilenameChanged=0;

View File

@ -175,6 +175,7 @@ void ShowPreferences( void )
int i = 0;
char * tmp[3]; tmp[2]="";
old_audio_driver=-1;
if ( CLADrivers ) gtk_clist_clear( GTK_CLIST( CLADrivers ) );
while ( audio_out_drivers[i] )
{
const ao_info_t *info = audio_out_drivers[i++]->info;
@ -220,6 +221,7 @@ void ShowPreferences( void )
int i = 0, c = 0;
char * tmp[3]; tmp[2]="";
old_video_driver=0;
if ( CLVDrivers ) gtk_clist_clear( GTK_CLIST( CLVDrivers ) );
while ( video_out_drivers[i] )
if ( video_out_drivers[i++]->control( VOCTRL_GUISUPPORT,NULL ) == VO_TRUE )
{

View File

@ -273,14 +273,12 @@ void mplEventHandling( int msg,float param )
case evSetAudio:
if ( !guiIntfStruct.demuxer || audio_id == iparam ) break;
audio_id=iparam;
guiIntfStruct.NewPlay=1;
break;
goto play;
case evSetVideo:
if ( !guiIntfStruct.demuxer || video_id == iparam ) break;
video_id=iparam;
guiIntfStruct.NewPlay=1;
break;
goto play;
#ifdef HAVE_VCD
case evSetVCDTrack:

View File

@ -106,7 +106,7 @@ void mplEnd( void )
}
else
{
if ( guiIntfStruct.FilenameChanged ) return;
if ( guiIntfStruct.FilenameChanged || guiIntfStruct.NewPlay ) return;
guiIntfStruct.TimeSec=0;
guiIntfStruct.Position=0;