aboutsummaryrefslogtreecommitdiffstats
path: root/ffserver.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2010-06-03 20:58:22 +0000
committerMartin Storsjö <martin@martin.st>2010-06-03 20:58:22 +0000
commitf475f35fdd0bb3c15737609352c69bc352c8ec15 (patch)
treeb52949cb9cf6e0dd07a25e3f6b31bc6456117a13 /ffserver.c
parentee0e91462ce299151a856bddc4f5ba9fb170d233 (diff)
downloadffmpeg-f475f35fdd0bb3c15737609352c69bc352c8ec15.tar.gz
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. Originally committed as revision 23450 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffserver.c')
-rw-r--r--ffserver.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ffserver.c b/ffserver.c
index 7af4938fe4..6d1e710c6a 100644
--- a/ffserver.c
+++ b/ffserver.c
@@ -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;