]> git.sesse.net Git - ffmpeg/commitdiff
Do not use the pts/dts calculation code which needs a parser, when no parser
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 27 May 2008 18:43:25 +0000 (18:43 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 27 May 2008 18:43:25 +0000 (18:43 +0000)
is available.

Originally committed as revision 13470 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/utils.c

index fbc5c8bfe3c35d1428a398947cbed42a987c87c4..ea6dd0d5d31d50c1408949f5a76dbf1ae57b5d2d 100644 (file)
@@ -703,7 +703,7 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st,
 
 //    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 */