summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2008-03-02 23:47:30 +0000
committerMichael Niedermayer <michaelni@gmx.at>2008-03-02 23:47:30 +0000
commita7805e298395372e64f5d6c0e3d60ceddff6adf9 (patch)
tree3c788df2769eea9bced512a5b13cd744e4c92d8e /libavformat
parent9fdfd21c771c55d80122b205975f17bcf69ac624 (diff)
downloadffmpeg-a7805e298395372e64f5d6c0e3d60ceddff6adf9.tar.gz
Fallback to sample rate if bit rate is 0. This avoids 0 timebases in nut.
Originally committed as revision 12294 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/riff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/riff.c b/libavformat/riff.c
index 64891db3e8..b977f0dcbf 100644
--- a/libavformat/riff.c
+++ b/libavformat/riff.c
@@ -441,7 +441,7 @@ void ff_parse_specific_params(AVCodecContext *stream, int *au_rate, int *au_ssiz
*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;