changeset 9132:c945b963d7c6

1000l bug (double free() when libaf init failed) thanx for their help: Michael Mauch <michael.mauch@gmx.de> Marc Packenius <marc@freenet-rz.de> Bartek Kulicki <bartek@interecho.com>
author arpi
date Tue, 28 Jan 2003 00:59:34 +0000
parents 67d28a3f918a
children a45282d6ad32
files libmpcodecs/dec_audio.c mplayer.c
diffstat 2 files changed, 1 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/dec_audio.c	Tue Jan 28 00:27:59 2003 +0000
+++ b/libmpcodecs/dec_audio.c	Tue Jan 28 00:59:34 2003 +0000
@@ -353,6 +353,7 @@
   
   // let's autoprobe it!
   if(0 != af_init(afs,1)){
+    sh_audio->afilter=NULL;
     free(afs);
     return 0; // failed :(
   }
--- a/mplayer.c	Tue Jan 28 00:27:59 2003 +0000
+++ b/mplayer.c	Tue Jan 28 00:59:34 2003 +0000
@@ -1676,13 +1676,6 @@
 	audio_out_format_bits(ao_data.format)/8, /* ao_data.bps, */
 	ao_data.outburst*4, ao_data.buffersize)){
       mp_msg(MSGT_CPLAYER,MSGL_ERR,"Couldn't find matching filter / ao format!\n");
-#if 0
-      if(sh_audio->afilter){
-          free(sh_audio->afilter); sh_audio->afilter=NULL;
-      }
-#else
-      sh_audio->afilter=NULL;
-#endif
 //      mp_msg(MSGT_CPLAYER,MSGL_ERR,"Couldn't find matching filter / ao format! -> NOSOUND\n");
 //      uninit_player(INITED_ACODEC|INITED_AO); // close codec & ao
 //      sh_audio=d_audio->sh=NULL; // -> nosound