Mercurial > libavformat.hg
changeset 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 | fca018d1bbce |
children | 0f8d91124c84 |
files | riff.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
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;