Mercurial > mplayer.hg
changeset 19694:d32f43ae7f5b
in fixup_vorbis_wf() set to 0 bitrates indicated as -1 (unspecified, according to the specs); patch by Andrew Savchenko - Bircoph list ru
author | nicodvb |
---|---|
date | Tue, 05 Sep 2006 20:18:42 +0000 |
parents | 3fc2235ff062 |
children | 782364fc00c4 |
files | libmpdemux/demux_ogg.c |
diffstat | 1 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpdemux/demux_ogg.c Tue Sep 05 20:06:20 2006 +0000 +++ b/libmpdemux/demux_ogg.c Tue Sep 05 20:18:42 2006 +0000 @@ -816,13 +816,22 @@ sh->wf = (WAVEFORMATEX*)realloc(sh->wf, sizeof(WAVEFORMATEX) + sh->wf->cbSize); if(op[0].bytes >= 29) { - unsigned int br, nombr, minbr, maxbr; + unsigned int br; + int nombr, minbr, maxbr; ptr = buf[0]; sh->channels = ptr[11]; sh->samplerate = sh->wf->nSamplesPerSec = get_uint32(&ptr[12]); maxbr = get_uint32(&ptr[16]); //max nombr = get_uint32(&ptr[20]); //nominal minbr = get_uint32(&ptr[24]); //minimum + + if(maxbr == -1) + maxbr = 0; + if(nombr == -1) + nombr = 0; + if(minbr == -1) + minbr = 0; + br = maxbr / 8; if(!br) br = nombr / 8;