From 949880a05613ae09dee0d895342e60d6e02ab354 Mon Sep 17 00:00:00 2001 From: reimar Date: Mon, 27 Aug 2007 15:51:04 +0000 Subject: Set sample_rate and bit_rate from sh_audio as fallback in case sh_audio->wf is not available. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24246 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/ad_ffmpeg.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libmpcodecs') diff --git a/libmpcodecs/ad_ffmpeg.c b/libmpcodecs/ad_ffmpeg.c index e4daacdba2..8061eab410 100644 --- a/libmpcodecs/ad_ffmpeg.c +++ b/libmpcodecs/ad_ffmpeg.c @@ -59,6 +59,8 @@ static int init(sh_audio_t *sh_audio) lavc_context = avcodec_alloc_context(); sh_audio->context=lavc_context; + lavc_context->sample_rate = sh_audio->samplerate; + lavc_context->bit_rate = sh_audio->i_bps * 8; if(sh_audio->wf){ lavc_context->channels = sh_audio->wf->nChannels; lavc_context->sample_rate = sh_audio->wf->nSamplesPerSec; -- cgit v1.2.3