From ac71a892e149d9304dd32ced7d5066f9eb559902 Mon Sep 17 00:00:00 2001 From: reimar Date: Fri, 10 Dec 2004 23:04:54 +0000 Subject: 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 --- mplayer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mplayer.c') diff --git a/mplayer.c b/mplayer.c index fb47735c56..463941f06d 100644 --- a/mplayer.c +++ b/mplayer.c @@ -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) -- cgit v1.2.3