From 0b38aaf6ec23466515af065e94626a1eec01a506 Mon Sep 17 00:00:00 2001 From: arpi Date: Sat, 15 Mar 2003 21:07:45 +0000 Subject: 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 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9607 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpdemux/video.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libmpdemux') diff --git a/libmpdemux/video.c b/libmpdemux/video.c index 5871bbe1f8..3049638afa 100644 --- a/libmpdemux/video.c +++ b/libmpdemux/video.c @@ -224,7 +224,7 @@ switch(d_video->demuxer->file_format){ 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 @@ switch(d_video->demuxer->file_format){ 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) -- cgit v1.2.3