Mercurial > libavformat.hg
diff riff.c @ 3103:137e1fc7d16b libavformat
Fallback to sample rate if bit rate is 0. This avoids 0 timebases in nut.
author | michael |
---|---|
date | Sun, 02 Mar 2008 23:47:30 +0000 |
parents | ce8ea5400041 |
children | bc8df1731826 |
line wrap: on
line diff
--- a/riff.c Sun Mar 02 23:13:07 2008 +0000 +++ b/riff.c Sun Mar 02 23:47:30 2008 +0000 @@ -441,7 +441,7 @@ *au_rate = stream->time_base.den; }else{ *au_scale= stream->block_align ? stream->block_align*8 : 8; - *au_rate = stream->bit_rate; + *au_rate = stream->bit_rate ? stream->bit_rate : 8*stream->sample_rate; } gcd= ff_gcd(*au_scale, *au_rate); *au_scale /= gcd;