changeset 442:e17fb306b107 libavformat

store correct pts
author michael
date Mon, 12 Apr 2004 22:23:16 +0000
parents 6635c1e75087
children afbe3a5aae02
files nut.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/nut.c	Mon Apr 12 20:06:23 2004 +0000
+++ b/nut.c	Mon Apr 12 22:23:16 2004 +0000
@@ -645,6 +645,8 @@
 
     enc = &s->streams[stream_index]->codec;
     key_frame = enc->coded_frame->key_frame;
+    if(enc->coded_frame->pts != AV_NOPTS_VALUE)
+        pts= (av_rescale(enc->coded_frame->pts, stream->rate_num, stream->rate_den) + AV_TIME_BASE/2) / AV_TIME_BASE; //FIXME XXX HACK
     delta_pts= pts - stream->last_pts;
     
     frame_type=0;