rescale duration when outputting packet
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>
Sat, 21 Jun 2008 03:32:37 +0000 (03:32 +0000)
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>
Sat, 21 Jun 2008 03:32:37 +0000 (03:32 +0000)
Originally committed as revision 13845 to svn://svn.ffmpeg.org/ffmpeg/trunk

ffserver.c

index 92d7821..de44728 100644 (file)
@@ -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;