if( currentaudiostream == aviaudiostream ){ aviaudiostream = NULL; }
void  updateLoaded (){  if (avifileinfo)    {      delete avifileinfo;      avifileinfo = NULL;    }  avifileinfo = new aviInfo;  if (!video_body->getVideoInfo (avifileinfo))    {//      err1:      printf ("\n get info failed...cancelling load...\n");      delete avifileinfo;      avifileinfo = (aviInfo *) NULL;      currentaudiostream = aviaudiostream = NULL;      return;    }  curframe = 0;  video_body->flushCache();  assert (rdr_decomp_buffer =	  (uint8_t *) malloc (3 * avifileinfo->width * avifileinfo->height));  //frameStart = 0;  //frameEnd = avifileinfo->nb_frames - 1;  video_body->getMarkers(&frameStart,&frameEnd);  UI_setMarkers (frameStart, frameEnd);  // now get audio information if exists  wavinfo = video_body->getAudioInfo ();	//wavinfo); // will be null if no audio  if (!wavinfo)    {      printf ("\n *** NO AUDIO ***\n");      wavinfo = (WAVHeader *) NULL;      currentaudiostream = aviaudiostream = (AVDMGenericAudioStream *) NULL;    }  else    {      video_body->getAudioStream (&aviaudiostream);      changeAudioStream (aviaudiostream, AudioAvi);      if (aviaudiostream)	if (!aviaudiostream->isDecompressable ())	  {	    GUI_Alert ("Beware: No valid audio codec found!\n"		       "Save(A+V) will generate bad AVI\nSave audio will work");	  }    }  // Init renderer  renderResize (avifileinfo->width, avifileinfo->height);  curframe = 0;  rebuild_status_bar ();  // Draw first frame  if (!video_body->getUncompressedFrame (curframe, rdr_decomp_buffer))    {      GUI_Alert ("Problem decompressing frame!");    }  else    {      renderUpdateImage (rdr_decomp_buffer);      renderRefresh ();    }   printf("\n** conf updated **\n");}