mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-25 16:52:31 +00:00
avcodec/dovi_rpuenc: avoid division by zero
Fixes: https://trac.ffmpeg.org/ticket/10985
This commit is contained in:
parent
b7debef3cc
commit
1d89de03d6
@ -245,7 +245,7 @@ static inline void put_se_coef(PutBitContext *pb, const AVDOVIRpuDataHeader *hdr
|
||||
|
||||
static int av_q2den(AVRational q, int den)
|
||||
{
|
||||
if (q.den == den)
|
||||
if (!q.den || q.den == den)
|
||||
return q.num;
|
||||
q = av_mul_q(q, av_make_q(den, 1));
|
||||
return (q.num + (q.den >> 1)) / q.den;
|
||||
|
Loading…
Reference in New Issue
Block a user