[Mplayer-cvslog] CVS: main mencoder.c,1.121,1.122
Arpi of Ize
arpi at mplayerhq.hu
Thu Apr 18 16:23:10 CEST 2002
Update of /cvsroot/mplayer/main
In directory mail:/var/tmp.root/cvs-serv26287
Modified Files:
mencoder.c
Log Message:
cbr mp3 + wmp fixed (hopefully, untested)
Index: mencoder.c
===================================================================
RCS file: /cvsroot/mplayer/main/mencoder.c,v
retrieving revision 1.121
retrieving revision 1.122
diff -u -r1.121 -r1.122
--- mencoder.c 17 Apr 2002 22:17:32 -0000 1.121
+++ mencoder.c 18 Apr 2002 14:23:07 -0000 1.122
@@ -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
More information about the MPlayer-cvslog
mailing list