Mercurial > mplayer.hg
changeset 15314:5ca3a981d62a
fix timestamps
author | michael |
---|---|
date | Sun, 01 May 2005 11:13:14 +0000 |
parents | ff379596f099 |
children | fd674500a042 |
files | libmpdemux/muxer_lavf.c |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpdemux/muxer_lavf.c Sun May 01 10:40:42 2005 +0000 +++ b/libmpdemux/muxer_lavf.c Sun May 01 11:13:14 2005 +0000 @@ -213,7 +213,12 @@ //pkt.pts = AV_NOPTS_VALUE; +#if LIBAVFORMAT_BUILD >= 4624 + pkt.pts = (stream->timer / av_q2d(priv->oc->streams[pkt.stream_index]->time_base) + 0.5); +#else pkt.pts = AV_TIME_BASE * stream->timer; +#endif +//fprintf(stderr, "%Ld %Ld id:%d tb:%f %f\n", pkt.dts, pkt.pts, pkt.stream_index, av_q2d(priv->oc->streams[pkt.stream_index]->time_base), stream->timer); if(av_interleaved_write_frame(priv->oc, &pkt) != 0) //av_write_frame(priv->oc, &pkt) {