# HG changeset patch # User arpi # Date 1019139787 0 # Node ID 1186930949c0d61af22f655f26f762f65a249727 # Parent 1f8b34f1e7c0c27aceda68c4dedd1840b5c2c3ec cbr mp3 + wmp fixed (hopefully, untested) diff -r 1f8b34f1e7c0 -r 1186930949c0 mencoder.c --- a/mencoder.c Thu Apr 18 14:03:50 2002 +0000 +++ b/mencoder.c Thu Apr 18 14:23:07 2002 +0000 @@ -1096,10 +1096,14 @@ // 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