1
mirror of https://github.com/mpv-player/mpv synced 2024-11-03 03:19:24 +01:00

cbr mp3 + wmp fixed (hopefully, untested)

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5674 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
arpi 2002-04-18 14:23:07 +00:00
parent 29c8d470bb
commit 92c3b9234a

View File

@ -1096,10 +1096,14 @@ if(sh_audio && !demuxer2){
// fixup CBR mp3 audio header:
if(sh_audio && mux_a->codec==ACODEC_VBRMP3 && !lame_param_vbr){
mux_a->h.dwSampleSize=1;
((MPEGLAYER3WAVEFORMAT*)(mux_a->wf))->nBlockSize=
(mux_a->size+(mux_a->h.dwLength>>1))/mux_a->h.dwLength;
mux_a->h.dwLength=mux_a->size;
mux_a->h.dwRate=mux_a->wf->nAvgBytesPerSec;
mux_a->h.dwScale=1;
printf("\n\nCBR audio effective bitrate: %8.3f kbit/s (%d bytes/sec)\n",
mux_a->h.dwRate*8.0f/1000.0f,mux_a->h.dwRate);
mux_a->wf->nBlockAlign=1;
printf("\n\nCBR audio: %d bytes/sec, %d bytes/block\n",
mux_a->h.dwRate,((MPEGLAYER3WAVEFORMAT*)(mux_a->wf))->nBlockSize);
}
#endif