changeset 3376:7db242158d51 libavformat

Do not use the pts/dts calculation code which needs a parser, when no parser is available.
author michael
date Tue, 27 May 2008 18:43:25 +0000
parents 9877da0d8be3
children 7b34cd9dfe85
files utils.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/utils.c	Tue May 27 04:33:48 2008 +0000
+++ b/utils.c	Tue May 27 18:43:25 2008 +0000
@@ -703,7 +703,7 @@
 
 //    av_log(NULL, AV_LOG_DEBUG, "IN delayed:%d pts:%"PRId64", dts:%"PRId64" cur_dts:%"PRId64" st:%d pc:%p\n", presentation_delayed, pkt->pts, pkt->dts, st->cur_dts, pkt->stream_index, pc);
     /* interpolate PTS and DTS if they are not present */
-    if(delay <=1){
+    if(delay==0 || (delay==1 && pc)){
         if (presentation_delayed) {
             /* DTS = decompression timestamp */
             /* PTS = presentation timestamp */