comparison utils.c @ 3973:549a09cf23fe libavformat

Remove offset_t typedef and use int64_t directly instead. The name offset_t is easily confused with the standard off_t type and *_t is POSIX reserved namespace if any POSIX header is included.
author diego
date Fri, 03 Oct 2008 10:16:29 +0000
parents a324a7aa8a5b
children 19dbf5d63f15
comparison
equal deleted inserted replaced
3972:c7a831579a13 3973:549a09cf23fe
1699 } 1699 }
1700 1700
1701 #define DURATION_MAX_READ_SIZE 250000 1701 #define DURATION_MAX_READ_SIZE 250000
1702 1702
1703 /* only usable for MPEG-PS streams */ 1703 /* only usable for MPEG-PS streams */
1704 static void av_estimate_timings_from_pts(AVFormatContext *ic, offset_t old_offset) 1704 static void av_estimate_timings_from_pts(AVFormatContext *ic, int64_t old_offset)
1705 { 1705 {
1706 AVPacket pkt1, *pkt = &pkt1; 1706 AVPacket pkt1, *pkt = &pkt1;
1707 AVStream *st; 1707 AVStream *st;
1708 int read_size, i, ret; 1708 int read_size, i, ret;
1709 int64_t end_time; 1709 int64_t end_time;
1792 st->cur_dts= st->first_dts; 1792 st->cur_dts= st->first_dts;
1793 st->last_IP_pts = AV_NOPTS_VALUE; 1793 st->last_IP_pts = AV_NOPTS_VALUE;
1794 } 1794 }
1795 } 1795 }
1796 1796
1797 static void av_estimate_timings(AVFormatContext *ic, offset_t old_offset) 1797 static void av_estimate_timings(AVFormatContext *ic, int64_t old_offset)
1798 { 1798 {
1799 int64_t file_size; 1799 int64_t file_size;
1800 1800
1801 /* get the file size, if possible */ 1801 /* get the file size, if possible */
1802 if (ic->iformat->flags & AVFMT_NOFILE) { 1802 if (ic->iformat->flags & AVFMT_NOFILE) {
2001 AVStream *st; 2001 AVStream *st;
2002 AVPacket pkt1, *pkt; 2002 AVPacket pkt1, *pkt;
2003 int64_t last_dts[MAX_STREAMS]; 2003 int64_t last_dts[MAX_STREAMS];
2004 int duration_count[MAX_STREAMS]={0}; 2004 int duration_count[MAX_STREAMS]={0};
2005 double (*duration_error)[MAX_STD_TIMEBASES]; 2005 double (*duration_error)[MAX_STD_TIMEBASES];
2006 offset_t old_offset = url_ftell(ic->pb); 2006 int64_t old_offset = url_ftell(ic->pb);
2007 int64_t codec_info_duration[MAX_STREAMS]={0}; 2007 int64_t codec_info_duration[MAX_STREAMS]={0};
2008 int codec_info_nb_frames[MAX_STREAMS]={0}; 2008 int codec_info_nb_frames[MAX_STREAMS]={0};
2009 2009
2010 duration_error = av_mallocz(MAX_STREAMS * sizeof(*duration_error)); 2010 duration_error = av_mallocz(MAX_STREAMS * sizeof(*duration_error));
2011 if (!duration_error) return AVERROR(ENOMEM); 2011 if (!duration_error) return AVERROR(ENOMEM);