Commit 7c2fa13d authored by Michael Niedermayer's avatar Michael Niedermayer

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

Fixes division by zero
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 7474ea74
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment