Commit 974ac57e authored by James Almer's avatar James Almer Committed by Michael Niedermayer

astenc: Remove two AVRationals with denominator 1

They are completely superfluous when using av_rescale_q_rnd().
Call av_rescale_rnd() using what used to be the numerators instead.
Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 8525fa7c
......@@ -37,7 +37,7 @@ typedef struct ASTMuxContext {
#define CHECK_LOOP(type) \
if (ast->loop ## type) { \
ast->loop ## type = av_rescale_q_rnd(ast->loop ## type, (AVRational){enc->sample_rate, 1}, (AVRational){1000, 1}, AV_ROUND_DOWN); \
ast->loop ## type = av_rescale_rnd(ast->loop ## type, enc->sample_rate, 1000, AV_ROUND_DOWN); \
if (ast->loop ## type < 0 || ast->loop ## type > UINT_MAX) { \
av_log(s, AV_LOG_ERROR, "Invalid loop" #type " value\n"); \
return AVERROR(EINVAL); \
......
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