From b43bf8acf167eaa33d67df00cfbff22d4b95fd91 Mon Sep 17 00:00:00 2001 From: Baptiste Coudurier Date: Sat, 21 Jun 2008 03:32:37 +0000 Subject: rescale duration when outputting packet Originally committed as revision 13845 to svn://svn.ffmpeg.org/ffmpeg/trunk --- ffserver.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ffserver.c') diff --git a/ffserver.c b/ffserver.c index 92d7821cb1..de447288a4 100644 --- a/ffserver.c +++ b/ffserver.c @@ -2173,6 +2173,9 @@ static int http_prepare_data(HTTPContext *c) pkt.pts = av_rescale_q(pkt.pts, c->fmt_in->streams[source_index]->time_base, ctx->streams[pkt.stream_index]->time_base); + pkt.duration = av_rescale_q(pkt.duration, + c->fmt_in->streams[source_index]->time_base, + ctx->streams[pkt.stream_index]->time_base); if (av_write_frame(ctx, &pkt) < 0) { http_log("Error writing frame to output\n"); c->state = HTTPSTATE_SEND_DATA_TRAILER; -- cgit v1.2.3