Mercurial > mplayer.hg
comparison libmpdemux/muxer_mpeg.c @ 22924:4822223d8425
small syntax fix: muxrate is expressed in units of 400 bits/second, not 50 bytes per second
author | nicodvb |
---|---|
date | Sun, 08 Apr 2007 09:50:27 +0000 |
parents | 60498e21115a |
children | a8f534c4e071 |
comparison
equal
deleted
inserted
replaced
22923:019fe1fd36b0 | 22924:4822223d8425 |
---|---|
497 } | 497 } |
498 | 498 |
499 | 499 |
500 static void write_mpeg_rate(int type, unsigned char *b, unsigned int rate) | 500 static void write_mpeg_rate(int type, unsigned char *b, unsigned int rate) |
501 { | 501 { |
502 rate = (rate+49) / 50; | 502 rate = ((rate*8)+399) / 400; |
503 | 503 |
504 if(type == MUX_MPEG1) | 504 if(type == MUX_MPEG1) |
505 { | 505 { |
506 b[0] = ((rate >> 15) & 0x7f) | 0x80; | 506 b[0] = ((rate >> 15) & 0x7f) | 0x80; |
507 b[1] = (rate >> 7) & 0xff; | 507 b[1] = (rate >> 7) & 0xff; |