stream_pos = av_gettime() - c->stream->prebuffer * 1000;
stream_pos = av_gettime() - c->stream->prebuffer * (INT64)1000;
static int open_input_stream(HTTPContext *c, const char *info){    char buf[128];    char input_filename[1024];    AVFormatContext *s;    int buf_size, i;    INT64 stream_pos;    /* find file name */    if (c->stream->feed) {        strcpy(input_filename, c->stream->feed->feed_filename);        buf_size = FFM_PACKET_SIZE;        /* compute position (absolute time) */        if (find_info_tag(buf, sizeof(buf), "date", info)) {            stream_pos = parse_date(buf, 0);        } else if (find_info_tag(buf, sizeof(buf), "buffer", info)) {            int prebuffer = strtol(buf, 0, 10);            stream_pos = av_gettime() - prebuffer * 1000000;        } else {            stream_pos = av_gettime() - c->stream->prebuffer * 1000;        }    } else {        strcpy(input_filename, c->stream->feed_filename);        buf_size = 0;        /* compute position (relative time) */        if (find_info_tag(buf, sizeof(buf), "date", info)) {            stream_pos = parse_date(buf, 1);        } else {            stream_pos = 0;        }    }    if (input_filename[0] == '\0')        return -1;#if 0    { time_t when = stream_pos / 1000000;    http_log("Stream pos = %lld, time=%s", stream_pos, ctime(&when));    }#endif    /* open stream */    if (av_open_input_file(&s, input_filename, NULL, buf_size, NULL) < 0) {        http_log("%s not found", input_filename);        return -1;    }    c->fmt_in = s;        /* open each parser */    for(i=0;i<s->nb_streams;i++)        open_parser(s, i);    /* choose stream as clock source (we favorize video stream if       present) for packet sending */    c->pts_stream_index = 0;    for(i=0;i<c->stream->nb_streams;i++) {        if (c->pts_stream_index == 0 &&             c->stream->streams[i]->codec.codec_type == CODEC_TYPE_VIDEO) {            c->pts_stream_index = i;        }    }    if (c->fmt_in->iformat->read_seek) {        c->fmt_in->iformat->read_seek(c->fmt_in, stream_pos);    }    /* set the start time (needed for maxtime and RTP packet timing) */    c->start_time = cur_time;    c->first_pts = AV_NOPTS_VALUE;    return 0;}