changeset 1924:3983fe904b71 libavformat

simplify
author michael
date Sat, 17 Mar 2007 01:21:40 +0000
parents 83a496207fb5
children 9012fcda4257
files utils.c
diffstat 1 files changed, 6 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/utils.c	Fri Mar 16 23:02:33 2007 +0000
+++ b/utils.c	Sat Mar 17 01:21:40 2007 +0000
@@ -648,20 +648,12 @@
         }
 
         /* presentation is not delayed : PTS and DTS are the same */
-        if (pkt->pts == AV_NOPTS_VALUE) {
-            if (pkt->dts == AV_NOPTS_VALUE) {
-                pkt->pts = st->cur_dts;
-                pkt->dts = st->cur_dts;
-            }
-            else {
-                st->cur_dts = pkt->dts;
-                pkt->pts = pkt->dts;
-            }
-        } else {
-            st->cur_dts = pkt->pts;
-            pkt->dts = pkt->pts;
-        }
-        st->cur_dts += pkt->duration;
+        if(pkt->pts == AV_NOPTS_VALUE)
+            pkt->pts = pkt->dts;
+        if(pkt->pts == AV_NOPTS_VALUE)
+            pkt->pts = st->cur_dts;
+        pkt->dts = pkt->pts;
+        st->cur_dts = pkt->pts + pkt->duration;
     }
 //    av_log(NULL, AV_LOG_DEBUG, "OUTdelayed:%d pts:%"PRId64", dts:%"PRId64" cur_dts:%"PRId64"\n", presentation_delayed, pkt->pts, pkt->dts, st->cur_dts);