changeset 5673:1186930949c0

cbr mp3 + wmp fixed (hopefully, untested)
author arpi
date Thu, 18 Apr 2002 14:23:07 +0000
parents 1f8b34f1e7c0
children 6f3175f4151d
files mencoder.c
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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