summaryrefslogtreecommitdiffstats
path: root/libmpcodecs
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-08-27 15:51:04 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-08-27 15:51:04 +0000
commit949880a05613ae09dee0d895342e60d6e02ab354 (patch)
tree10d291583b5f324a2dec42107a86e5beb5db0cb5 /libmpcodecs
parent40bb01cb45067796e0207e6b2ce4ea2ce0f07b76 (diff)
downloadmpv-949880a05613ae09dee0d895342e60d6e02ab354.tar.bz2
mpv-949880a05613ae09dee0d895342e60d6e02ab354.tar.xz
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
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/ad_ffmpeg.c2
1 files changed, 2 insertions, 0 deletions
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;