diff utils.c @ 5613:529c473fe20e libavformat

Flag to ignore dts on frames that contain pts. This works around common issues with mpeg-ps files with broken timestamps. Also allows playing the broken sample from issue1024.
author michael
date Sat, 30 Jan 2010 22:55:12 +0000
parents be39b68919ab
children f50eb231b06a
line wrap: on
line diff
--- a/utils.c	Sat Jan 30 22:05:26 2010 +0000
+++ b/utils.c	Sat Jan 30 22:55:12 2010 +0000
@@ -808,6 +808,9 @@
     int num, den, presentation_delayed, delay, i;
     int64_t offset;
 
+    if((s->flags & AVFMT_FLAG_IGNDTS) && pkt->pts != AV_NOPTS_VALUE)
+        pkt->dts= AV_NOPTS_VALUE;
+
     if (st->codec->codec_id != CODEC_ID_H264 && pc && pc->pict_type == FF_B_TYPE)
         //FIXME Set low_delay = 0 when has_b_frames = 1
         st->codec->has_b_frames = 1;