[MPlayer-cvslog] r34829 - trunk/libmpcodecs/ad_libmad.c
reimar
subversion at mplayerhq.hu
Sat Mar 24 20:22:16 CET 2012
Author: reimar
Date: Sat Mar 24 20:22:16 2012
New Revision: 34829
Log:
libmad: set i_bps only if it is not already set.
Since that value is only based on the very first MP3 frame,
it is very likely to be much less accurate than any existing
value from a demuxer.
Patch by Benoît Thébaudeau.
Signed-off-by: "Benoît Thébaudeau" <benoit.thebaudeau at advansee.com>
Modified:
trunk/libmpcodecs/ad_libmad.c
Modified: trunk/libmpcodecs/ad_libmad.c
==============================================================================
--- trunk/libmpcodecs/ad_libmad.c Sat Mar 24 20:19:48 2012 (r34828)
+++ trunk/libmpcodecs/ad_libmad.c Sat Mar 24 20:22:16 2012 (r34829)
@@ -100,7 +100,8 @@ static int init(sh_audio_t *sh){
sh->channels=(this->frame.header.mode == MAD_MODE_SINGLE_CHANNEL) ? 1 : 2;
sh->samplerate=this->frame.header.samplerate;
- sh->i_bps=this->frame.header.bitrate/8;
+ if (sh->i_bps < 1)
+ sh->i_bps=this->frame.header.bitrate/8;
sh->samplesize=2;
return 1;
More information about the MPlayer-cvslog
mailing list