[FFmpeg-cvslog] astenc: Remove two AVRationals with denominator 1
James Almer
git at videolan.org
Thu Dec 20 05:14:50 CET 2012
ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Tue Dec 18 21:48:06 2012 -0300| [974ac57e83f32f6876096ae20cb73000ff555753] | committer: 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: James Almer <jamrial at gmail.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=974ac57e83f32f6876096ae20cb73000ff555753
---
libavformat/astenc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/astenc.c b/libavformat/astenc.c
index 6121a01..10001c7 100644
--- a/libavformat/astenc.c
+++ b/libavformat/astenc.c
@@ -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); \
More information about the ffmpeg-cvslog
mailing list