Revision c3f58185

View differences:

ffserver.c
94 94

  
95 95
typedef struct {
96 96
    int64_t count1, count2;
97
    long time1, time2;
97
    int64_t time1, time2;
98 98
} DataRateData;
99 99

  
100 100
/* context associated with one connection */
......
103 103
    int fd; /* socket file descriptor */
104 104
    struct sockaddr_in from_addr; /* origin */
105 105
    struct pollfd *poll_entry; /* used when polling */
106
    long timeout;
106
    int64_t timeout;
107 107
    uint8_t *buffer_ptr, *buffer_end;
108 108
    int http_error;
109 109
    int post;
......
114 114
    int feed_fd;
115 115
    /* input format handling */
116 116
    AVFormatContext *fmt_in;
117
    long start_time;            /* In milliseconds - this wraps fairly often */
117
    int64_t start_time;            /* In milliseconds - this wraps fairly often */
118 118
    int64_t first_pts;            /* initial pts value */
119 119
    int64_t cur_pts;             /* current pts value from the stream in us */
120 120
    int64_t cur_frame_duration;  /* duration of the current frame in us */
......
194 194
    IPAddressACL *acl;
195 195
    int nb_streams;
196 196
    int prebuffer;      /* Number of millseconds early to start */
197
    long max_time;      /* Number of milliseconds to run */
197
    int64_t max_time;      /* Number of milliseconds to run */
198 198
    int send_on_key;
199 199
    AVStream *streams[MAX_STREAMS];
200 200
    int feed_streams[MAX_STREAMS]; /* index of streams in the feed */
......
290 290
static int max_bandwidth;
291 291
static int current_bandwidth;
292 292

  
293
static long cur_time;           // Making this global saves on passing it around everywhere
293
static int64_t cur_time;           // Making this global saves on passing it around everywhere
294 294

  
295 295
static AVRandomState random_state;
296 296

  
......
597 597
                return -1;
598 598
        } while (ret <= 0);
599 599

  
600
        cur_time = (long)(av_gettime()/1000);
600
        cur_time = av_gettime() / 1000;
601 601

  
602 602
        if (need_to_start_children) {
603 603
            need_to_start_children = 0;
......
1960 1960
static int64_t get_server_clock(HTTPContext *c)
1961 1961
{
1962 1962
    /* compute current pts value from system time */
1963
    return (int64_t)(cur_time - c->start_time) * 1000LL;
1963
    return (cur_time - c->start_time) * 1000;
1964 1964
}
1965 1965

  
1966 1966
/* return the estimated time at which the current packet must be sent

Also available in: Unified diff