[MPlayer-cvslog] r35469 - trunk/libmpdemux/demux_audio.c

reimar subversion at mplayerhq.hu
Sun Nov 25 12:37:52 CET 2012


Author: reimar
Date: Sun Nov 25 12:37:52 2012
New Revision: 35469

Log:
Fix bitrate calculation for FLAC files.

Modified:
   trunk/libmpdemux/demux_audio.c

Modified: trunk/libmpdemux/demux_audio.c
==============================================================================
--- trunk/libmpdemux/demux_audio.c	Sat Nov 24 16:54:22 2012	(r35468)
+++ trunk/libmpdemux/demux_audio.c	Sun Nov 25 12:37:52 2012	(r35469)
@@ -603,8 +603,9 @@ static int demux_audio_open(demuxer_t* d
 	      int32_t srate;
 	      stream_skip(s, 14);
 	      srate = stream_read_int24(s) >> 4;
-	      num_samples  = (uint64_t)stream_read_int24(s) << 16;
-	      num_samples |= stream_read_word(s);
+	      num_samples  = stream_read_char(s) & 0xf;
+	      num_samples <<= 32;
+	      num_samples |= stream_read_dword(s);
 	      if (num_samples && srate)
 	        sh_audio->i_bps = size * srate / num_samples;
 	    }


More information about the MPlayer-cvslog mailing list