[MPlayer-cvslog] r24246 - trunk/libmpcodecs/ad_ffmpeg.c

reimar subversion at mplayerhq.hu
Mon Aug 27 17:51:04 CEST 2007


Author: reimar
Date: Mon Aug 27 17:51:04 2007
New Revision: 24246

Log:
Set sample_rate and bit_rate from sh_audio as fallback in case sh_audio->wf
is not available.


Modified:
   trunk/libmpcodecs/ad_ffmpeg.c

Modified: trunk/libmpcodecs/ad_ffmpeg.c
==============================================================================
--- trunk/libmpcodecs/ad_ffmpeg.c	(original)
+++ trunk/libmpcodecs/ad_ffmpeg.c	Mon Aug 27 17:51:04 2007
@@ -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;



More information about the MPlayer-cvslog mailing list