changeset 3417:e38326ffbb5e libavformat

Do not set pts in update_initial_durations() if stream has b frames.
author michael
date Tue, 03 Jun 2008 00:43:56 +0000
parents f386245ae6f7
children 1e1c7967ba6c
files utils.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/utils.c	Mon Jun 02 23:37:14 2008 +0000
+++ b/utils.c	Tue Jun 03 00:43:56 2008 +0000
@@ -645,7 +645,9 @@
             continue;
         if(pktl->pkt.pts == pktl->pkt.dts && pktl->pkt.dts == AV_NOPTS_VALUE
            && !pktl->pkt.duration){
-            pktl->pkt.pts= pktl->pkt.dts= st->cur_dts;
+            pktl->pkt.dts= st->cur_dts;
+            if(!st->codec->has_b_frames)
+                pktl->pkt.pts= st->cur_dts;
             st->cur_dts += pkt->duration;
             pktl->pkt.duration= pkt->duration;
         }else