[MPlayer-cvslog] CVS: main/libmpcodecs ad_ffmpeg.c,1.22,1.23

Diego Biurrun CVS syncmail at mplayerhq.hu
Thu Mar 30 10:47:12 CEST 2006


CVS change done by Diego Biurrun CVS

Update of /cvsroot/mplayer/main/libmpcodecs
In directory mail:/var2/tmp/cvs-serv28689/libmpcodecs

Modified Files:
	ad_ffmpeg.c 
Log Message:
Trust the demuxer instead of the decoder for samplerate detection.
Fixes the ffmp3_bad_rate_detection.avi sample.
patch by qwen dux qwendu__at__gmail__.__com


Index: ad_ffmpeg.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/ad_ffmpeg.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- ad_ffmpeg.c	31 Jan 2006 23:36:12 -0000	1.22
+++ ad_ffmpeg.c	30 Mar 2006 08:47:09 -0000	1.23
@@ -109,15 +109,14 @@
    x=decode_audio(sh_audio,sh_audio->a_buffer,1,sh_audio->a_buffer_size);
    if(x>0) sh_audio->a_buffer_len=x;
 
-#if 1
   sh_audio->channels=lavc_context->channels;
   sh_audio->samplerate=lavc_context->sample_rate;
   sh_audio->i_bps=lavc_context->bit_rate/8;
-#else
-  sh_audio->channels=sh_audio->wf->nChannels;
-  sh_audio->samplerate=sh_audio->wf->nSamplesPerSec;
-  sh_audio->i_bps=sh_audio->wf->nAvgBytesPerSec;
-#endif
+  if(sh_audio->wf){
+      sh_audio->channels=sh_audio->wf->nChannels;
+      sh_audio->samplerate=sh_audio->wf->nSamplesPerSec;
+      sh_audio->i_bps=sh_audio->wf->nAvgBytesPerSec;
+  }
   sh_audio->samplesize=2;
   return 1;
 }




More information about the MPlayer-cvslog mailing list