# HG changeset patch # User arpi # Date 1047762465 0 # Node ID 0197c1e933fe9ff5784a0645fd6d7b2e515e11e7 # Parent 1bec441675d1a647c0e7c4a211a0dc38046bd750 This patch corrects the calculation of the MPEG bitrate from the sequence header. The bitrate contained in the sequence header is in units of 400 bits/s, not 500. Eric Lammerts diff -r 1bec441675d1 -r 0197c1e933fe libmpdemux/video.c --- a/libmpdemux/video.c Sat Mar 15 21:05:37 2003 +0000 +++ b/libmpdemux/video.c Sat Mar 15 21:07:45 2003 +0000 @@ -224,7 +224,7 @@ sh_video->disp_h=picture.display_picture_height; // bitrate: if(picture.bitrate!=0x3FFFF) // unspecified/VBR ? - sh_video->i_bps=1000*picture.bitrate/16; + sh_video->i_bps=picture.bitrate * 400 / 8; // info: mp_dbg(MSGT_DECVIDEO,MSGL_DBG2,"mpeg bitrate: %d (%X)\n",picture.bitrate,picture.bitrate); mp_msg(MSGT_DECVIDEO,MSGL_INFO,"VIDEO: %s %dx%d (aspect %d) %4.2f fps %5.1f kbps (%4.1f kbyte/s)\n", @@ -232,8 +232,8 @@ sh_video->disp_w,sh_video->disp_h, picture.aspect_ratio_information, sh_video->fps, - picture.bitrate*0.5f, - picture.bitrate/16.0f ); + sh_video->i_bps * 8 / 1000.0, + sh_video->i_bps / 1000.0 ); break; } } // switch(file_format)