comparison libmpdemux/muxer_lavf.c @ 15314:5ca3a981d62a

fix timestamps
author michael
date Sun, 01 May 2005 11:13:14 +0000
parents cfbd8e4b3ede
children 41fd530bd7a9
comparison
equal deleted inserted replaced
15313:ff379596f099 15314:5ca3a981d62a
211 else 211 else
212 pkt.flags = 0; 212 pkt.flags = 0;
213 213
214 214
215 //pkt.pts = AV_NOPTS_VALUE; 215 //pkt.pts = AV_NOPTS_VALUE;
216 #if LIBAVFORMAT_BUILD >= 4624
217 pkt.pts = (stream->timer / av_q2d(priv->oc->streams[pkt.stream_index]->time_base) + 0.5);
218 #else
216 pkt.pts = AV_TIME_BASE * stream->timer; 219 pkt.pts = AV_TIME_BASE * stream->timer;
220 #endif
221 //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);
217 222
218 if(av_interleaved_write_frame(priv->oc, &pkt) != 0) //av_write_frame(priv->oc, &pkt) 223 if(av_interleaved_write_frame(priv->oc, &pkt) != 0) //av_write_frame(priv->oc, &pkt)
219 { 224 {
220 mp_msg(MSGT_MUXER, MSGL_ERR, "Error while writing frame\n"); 225 mp_msg(MSGT_MUXER, MSGL_ERR, "Error while writing frame\n");
221 } 226 }