diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2007-02-24 02:28:28 +0000 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2007-02-24 02:28:28 +0000 |
commit | f1debfd0bd4c9ddb22ca90b622d2710899212f4b (patch) | |
tree | 6db4190c211a193742379500bca3eaa8c6d120f8 /ffserver.c | |
parent | f75cdda7185b5bb12da438a51cb9b7c5c59e51a1 (diff) | |
download | ffmpeg-f1debfd0bd4c9ddb22ca90b622d2710899212f4b.tar.gz |
rescale pts/dts for output format
Originally committed as revision 8111 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffserver.c')
-rw-r--r-- | ffserver.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ffserver.c b/ffserver.c index 696c9a94ad..30da29dcb3 100644 --- a/ffserver.c +++ b/ffserver.c @@ -2175,6 +2175,14 @@ static int http_prepare_data(HTTPContext *c) /* XXX: potential leak */ return -1; } + if (pkt.dts != AV_NOPTS_VALUE) + pkt.dts = av_rescale_q(pkt.dts, + c->fmt_in->streams[pkt.stream_index]->time_base, + ctx->streams[pkt.stream_index]->time_base); + if (pkt.pts != AV_NOPTS_VALUE) + pkt.pts = av_rescale_q(pkt.pts, + c->fmt_in->streams[pkt.stream_index]->time_base, + ctx->streams[pkt.stream_index]->time_base); if (av_write_frame(ctx, &pkt)) { c->state = HTTPSTATE_SEND_DATA_TRAILER; } |