# HG changeset patch # User arpi # Date 1004821761 0 # Node ID 40fbed77bbb8f42c21f0e33cc70d7a68670c2394 # Parent ad3a6bcad1d7ead118551e3a5e7a21a43f20ab4a avg bps calc fixed diff -r ad3a6bcad1d7 -r 40fbed77bbb8 mencoder.c --- a/mencoder.c Sat Nov 03 21:01:12 2001 +0000 +++ b/mencoder.c Sat Nov 03 21:09:21 2001 +0000 @@ -637,10 +637,11 @@ } break; } - mux_a->wf->nAvgBytesPerSec=mux_a->size/mux_a->timer; } if(len<=0) break; // EOF? aviwrite_write_chunk(muxer,mux_a,muxer_f,len,0); + if(!mux_a->h.dwSampleSize && mux_a->timer>0) + mux_a->wf->nAvgBytesPerSec=mux_a->size/mux_a->timer; // avg bps (VBR) if(mux_a->buffer_len>=len){ mux_a->buffer_len-=len; memcpy(mux_a->buffer,mux_a->buffer+len,mux_a->buffer_len);