[FFmpeg-devel] [PATCH 3/3] Only set starttime to pts when pts and dts agree

Benjamin Larsson benjamin
Wed Mar 2 18:28:01 CET 2011


---
 libavformat/utils.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index c8e16ba..7627364 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -872,7 +872,7 @@ static void update_initial_timestamps(AVFormatContext *s, int stream_index,
             st->start_time= pktl->pkt.pts;
     }
     if (st->start_time == AV_NOPTS_VALUE)
-        st->start_time = pts;
+        st->start_time = pts==dts ? pts : AV_NOPTS_VALUE;
 }
 
 static void update_initial_durations(AVFormatContext *s, AVStream *st, AVPacket *pkt)
-- 
1.7.1




More information about the ffmpeg-devel mailing list