summaryrefslogtreecommitdiff
path: root/libavformat/omadec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-02-07 21:12:56 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-02-07 21:12:56 +0100
commit7c2fa13df9a6130b3f258c7513933cbdca2fe23b (patch)
treeae244effb107e80c9ff215ec316f3149967d5ce5 /libavformat/omadec.c
parent7474ea74952b4d1be3bcd07efca5bd6c44b36b7a (diff)
downloadffmpeg-7c2fa13df9a6130b3f258c7513933cbdca2fe23b.tar.gz
avformat/omadec: only compute timestamps based on bitrate if its set
Fixes division by zero Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/omadec.c')
-rw-r--r--libavformat/omadec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/omadec.c b/libavformat/omadec.c
index b08005538c..6f3671b8e9 100644
--- a/libavformat/omadec.c
+++ b/libavformat/omadec.c
@@ -430,7 +430,7 @@ static int oma_read_packet(AVFormatContext *s, AVPacket *pkt)
pkt->stream_index = 0;
- if (pos > 0) {
+ if (pos > 0 && byte_rate > 0) {
pkt->pts =
pkt->dts = av_rescale(pos, st->time_base.den,
byte_rate * (int64_t)st->time_base.num);