diff options
author | Måns Rullgård <mans@mansr.com> | 2006-12-07 00:47:37 +0000 |
---|---|---|
committer | Måns Rullgård <mans@mansr.com> | 2006-12-07 00:47:37 +0000 |
commit | f27a726809bf8e5e1fa24638bbd6e04afa1fcd36 (patch) | |
tree | 36adc681d09ee88fcbade2209896ff0b61b0bce9 | |
parent | 8da9266ceaeb233a757d5ad8772bdf93601eec33 (diff) | |
download | ffmpeg-f27a726809bf8e5e1fa24638bbd6e04afa1fcd36.tar.gz |
use standard INT64_MAX instead of MAXINT64 (and MIN)
Originally committed as revision 7241 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | ffmpeg.c | 2 | ||||
-rw-r--r-- | libavformat/avformat.h | 8 | ||||
-rw-r--r-- | libavformat/utils.c | 8 |
3 files changed, 5 insertions, 13 deletions
@@ -881,7 +881,7 @@ static void do_video_stats(AVFormatContext *os, AVOutputStream *ost, } } - ti = MAXINT64; + ti = INT64_MAX; enc = ost->st->codec; if (enc->codec_type == CODEC_TYPE_VIDEO) { frame_number = ost->frame_number; diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 818d0729a5..07d521c7e2 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -39,14 +39,6 @@ extern "C" { /* packet functions */ -#ifndef MAXINT64 -#define MAXINT64 INT64_C(0x7fffffffffffffff) -#endif - -#ifndef MININT64 -#define MININT64 INT64_C(0x8000000000000000) -#endif - typedef struct AVPacket { int64_t pts; ///< presentation time stamp in time_base units int64_t dts; ///< decompression time stamp in time_base units diff --git a/libavformat/utils.c b/libavformat/utils.c index 55ed07414d..4c07a5389c 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -1472,8 +1472,8 @@ static void av_update_stream_timings(AVFormatContext *ic) int i; AVStream *st; - start_time = MAXINT64; - end_time = MININT64; + start_time = INT64_MAX; + end_time = INT64_MIN; for(i = 0;i < ic->nb_streams; i++) { st = ic->streams[i]; if (st->start_time != AV_NOPTS_VALUE) { @@ -1488,9 +1488,9 @@ static void av_update_stream_timings(AVFormatContext *ic) } } } - if (start_time != MAXINT64) { + if (start_time != INT64_MAX) { ic->start_time = start_time; - if (end_time != MININT64) { + if (end_time != INT64_MIN) { ic->duration = end_time - start_time; if (ic->file_size > 0) { /* compute the bit rate */ |