changeset 2301:45a6610e6a4f libavformat

set a more reasonable start_time if the first timestamps are AV_NOPTS_VALUE
author michael
date Sat, 04 Aug 2007 22:54:46 +0000
parents 9c8cfadff191
children 33033ec6fc6c
files utils.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/utils.c	Sat Aug 04 22:46:13 2007 +0000
+++ b/utils.c	Sat Aug 04 22:54:46 2007 +0000
@@ -608,6 +608,9 @@
 
         if(pktl->pkt.dts != AV_NOPTS_VALUE)
             pktl->pkt.dts += st->first_dts;
+
+        if(st->start_time == AV_NOPTS_VALUE && pktl->pkt.pts != AV_NOPTS_VALUE)
+            st->start_time= pktl->pkt.pts;
     }
 }