1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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

Fixes division by zero

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2015-02-07 21:12:56 +01:00
parent 7474ea7495
commit 7c2fa13df9

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