changeset 1379:4146500158b5 libavformat

Rename ABS macro to FFABS.
author diego
date Wed, 11 Oct 2006 23:17:58 +0000
parents a32812bb5bcf
children bfcb9fa1f431
files gxf.c ogg2.c utils.c
diffstat 3 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/gxf.c	Wed Oct 11 16:57:00 2006 +0000
+++ b/gxf.c	Wed Oct 11 23:17:58 2006 +0000
@@ -488,7 +488,7 @@
     maxlen = FFMAX(maxlen, 200 * 1024);
     url_fseek(&s->pb, pos, SEEK_SET);
     found = gxf_resync_media(s, maxlen, -1, timestamp);
-    if (ABS(found - timestamp) > 4)
+    if (FFABS(found - timestamp) > 4)
         return -1;
     return 0;
 }
--- a/ogg2.c	Wed Oct 11 16:57:00 2006 +0000
+++ b/ogg2.c	Wed Oct 11 23:17:58 2006 +0000
@@ -605,7 +605,7 @@
         pts = ogg_gptopts (s, i, ogg->streams[i].granule);
         p = url_ftell (bc);
 
-        if (ABS (pts - target_ts) * st->time_base.num < st->time_base.den)
+        if (FFABS (pts - target_ts) * st->time_base.num < st->time_base.den)
             break;
 
         if (pts > target_ts){
@@ -633,7 +633,7 @@
         }
     }
 
-    if (ABS (pts - target_ts) * st->time_base.num < st->time_base.den){
+    if (FFABS (pts - target_ts) * st->time_base.num < st->time_base.den){
         ogg_restore (s, 1);
         ogg_reset (ogg);
     }else{
--- a/utils.c	Wed Oct 11 16:57:00 2006 +0000
+++ b/utils.c	Wed Oct 11 23:17:58 2006 +0000
@@ -711,8 +711,8 @@
            by knowing the futur */
     } else if(pkt->pts != AV_NOPTS_VALUE || pkt->dts != AV_NOPTS_VALUE || pkt->duration){
         if(pkt->pts != AV_NOPTS_VALUE && pkt->duration){
-            int64_t old_diff= ABS(st->cur_dts - pkt->duration - pkt->pts);
-            int64_t new_diff= ABS(st->cur_dts - pkt->pts);
+            int64_t old_diff= FFABS(st->cur_dts - pkt->duration - pkt->pts);
+            int64_t new_diff= FFABS(st->cur_dts - pkt->pts);
             if(old_diff < new_diff && old_diff < (pkt->duration>>3)){
                 pkt->pts += pkt->duration;
 //                av_log(NULL, AV_LOG_DEBUG, "id:%d old:%Ld new:%Ld dur:%d cur:%Ld size:%d\n", pkt->stream_index, old_diff, new_diff, pkt->duration, st->cur_dts, pkt->size);
@@ -1947,7 +1947,7 @@
 
                 best_error= INT64_MAX;
                 for(j=1; j<60*12; j++){
-                    error= ABS(1001*12*num - 1001*j*den);
+                    error= FFABS(1001*12*num - 1001*j*den);
                     if(error < best_error){
                         best_error= error;
                         av_reduce(&st->r_frame_rate.num, &st->r_frame_rate.den, j, 12, INT_MAX);
@@ -1955,7 +1955,7 @@
                 }
                 for(j=0; j<3; j++){
                     static const int ticks[]= {24,30,60};
-                    error= ABS(1001*12*num - 1000*12*den * ticks[j]);
+                    error= FFABS(1001*12*num - 1000*12*den * ticks[j]);
                     if(error < best_error){
                         best_error= error;
                         av_reduce(&st->r_frame_rate.num, &st->r_frame_rate.den, ticks[j]*1000, 1001, INT_MAX);