[FFmpeg-cvslog] r23450 - trunk/ffserver.c
mstorsjo
subversion
Thu Jun 3 22:58:23 CEST 2010
Author: mstorsjo
Date: Thu Jun 3 22:58:22 2010
New Revision: 23450
Log:
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.
Modified:
trunk/ffserver.c
Modified: trunk/ffserver.c
==============================================================================
--- trunk/ffserver.c Thu Jun 3 22:47:59 2010 (r23449)
+++ trunk/ffserver.c Thu Jun 3 22:58:22 2010 (r23450)
@@ -2368,8 +2368,7 @@ static int http_prepare_data(HTTPContext
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;
More information about the ffmpeg-cvslog
mailing list