[FFmpeg-devel] [PATCH] av_rescale_q(): passthrough int64_min/max by default.

Michael Niedermayer michaelni at gmx.at
Thu Jan 3 00:16:21 CET 2013


This avoids the need for AV_NOPTS_VALUE checks

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
---
 libavutil/mathematics.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavutil/mathematics.c b/libavutil/mathematics.c
index f9cf87d..6a12b20 100644
--- a/libavutil/mathematics.c
+++ b/libavutil/mathematics.c
@@ -129,7 +129,7 @@ int64_t av_rescale_q_rnd(int64_t a, AVRational bq, AVRational cq,
 
 int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq)
 {
-    return av_rescale_q_rnd(a, bq, cq, AV_ROUND_NEAR_INF);
+    return av_rescale_q_rnd(a, bq, cq, AV_ROUND_NEAR_INF | AV_ROUND_PASS_MINMAX);
 }
 
 int av_compare_ts(int64_t ts_a, AVRational tb_a, int64_t ts_b, AVRational tb_b){
-- 
1.7.9.5



More information about the ffmpeg-devel mailing list