10l, should check for != NULL before using not after...

fixes speed setting with -nosound, fix by uau on IRC


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14141 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2004-12-10 23:04:54 +00:00
parent 301f77f3d0
commit ac71a892e1
1 changed files with 2 additions and 1 deletions

View File

@ -923,9 +923,10 @@ static void print_status(float a_pos, float a_v, float corr)
*/
static int build_afilter_chain(sh_audio_t *sh_audio, ao_data_t *ao_data)
{
int new_srate = sh_audio->samplerate * playback_speed;
int new_srate;
if (!sh_audio)
return 0;
new_srate = sh_audio->samplerate * playback_speed;
if (new_srate != ao_data->samplerate) {
// limits are taken from libaf/af_resample.c
if (new_srate < 8000)