diff options
author | Diego Biurrun <diego@biurrun.de> | 2006-10-11 23:17:58 +0000 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2006-10-11 23:17:58 +0000 |
commit | c26abfa5414becf3dd68d976ef5851c5cab477b6 (patch) | |
tree | 5a98401cf286223f51c29c0eab36f2a33b5f12e3 /libavformat | |
parent | 02305ff38ffcc41a72fc1cb79c028b724d2d795d (diff) | |
download | ffmpeg-c26abfa5414becf3dd68d976ef5851c5cab477b6.tar.gz |
Rename ABS macro to FFABS.
Originally committed as revision 6666 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/gxf.c | 2 | ||||
-rw-r--r-- | libavformat/ogg2.c | 4 | ||||
-rw-r--r-- | libavformat/utils.c | 8 |
3 files changed, 7 insertions, 7 deletions
diff --git a/libavformat/gxf.c b/libavformat/gxf.c index 58cd5e3427..5f4ce83906 100644 --- a/libavformat/gxf.c +++ b/libavformat/gxf.c @@ -488,7 +488,7 @@ static int gxf_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int 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; } diff --git a/libavformat/ogg2.c b/libavformat/ogg2.c index 9e6e1539b6..5f1366965a 100644 --- a/libavformat/ogg2.c +++ b/libavformat/ogg2.c @@ -605,7 +605,7 @@ ogg_read_seek (AVFormatContext * s, int stream_index, int64_t target_ts, 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 @@ ogg_read_seek (AVFormatContext * s, int stream_index, int64_t target_ts, } } - 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{ diff --git a/libavformat/utils.c b/libavformat/utils.c index 00cf969713..74b9647283 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -711,8 +711,8 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st, 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 @@ int av_find_stream_info(AVFormatContext *ic) 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 @@ int av_find_stream_info(AVFormatContext *ic) } 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); |