Commit eb80fd81 authored by mstorsjo's avatar mstorsjo

ffserver: Calculate cur_pts using first_pts as origin instead of ist->start_time

This fixes cases where ist->start_time wasn't initialized. This also makes
cur_pts calculated against the same origin for all streams.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23450 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent e9fca39f
......@@ -2368,8 +2368,7 @@ static int http_prepare_data(HTTPContext *c)
if (c->is_packetized) {
/* compute send time and duration */
c->cur_pts = av_rescale_q(pkt.dts, ist->time_base, AV_TIME_BASE_Q);
if (ist->start_time != AV_NOPTS_VALUE)
c->cur_pts -= av_rescale_q(ist->start_time, ist->time_base, AV_TIME_BASE_Q);
c->cur_pts -= c->first_pts;
c->cur_frame_duration = av_rescale_q(pkt.duration, ist->time_base, AV_TIME_BASE_Q);
/* find RTP context */
c->packet_stream_index = pkt.stream_index;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment