mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-24 12:09:55 +00:00
r3d: fix division by 0 with 0 sample rate
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
3cd9849d9c
commit
df92ac1852
@ -312,7 +312,8 @@ static int r3d_read_reda(AVFormatContext *s, AVPacket *pkt, Atom *atom)
|
||||
|
||||
pkt->stream_index = 1;
|
||||
pkt->dts = dts;
|
||||
pkt->duration = av_rescale(samples, st->time_base.den, st->codec->sample_rate);
|
||||
if (st->codec->sample_rate)
|
||||
pkt->duration = av_rescale(samples, st->time_base.den, st->codec->sample_rate);
|
||||
av_dlog(s, "pkt dts %"PRId64" duration %d samples %d sample rate %d\n",
|
||||
pkt->dts, pkt->duration, samples, st->codec->sample_rate);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user