mirror of
https://github.com/mpv-player/mpv
synced 2025-02-17 04:58:06 +00:00
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
This commit is contained in:
parent
40bb01cb45
commit
949880a056
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user