Browse Source

avformat/omadec: only compute timestamps based on bitrate if its set

Fixes division by zero

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.6
Michael Niedermayer 11 years ago
parent
commit
7c2fa13df9
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavformat/omadec.c

+ 1
- 1
libavformat/omadec.c View File

@@ -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);


Loading…
Cancel
Save