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.

Originally committed as revision 21562 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer
2010-01-30 22:55:12 +00:00
parent 6299a22904
commit c55806e3a2
3 changed files with 5 additions and 0 deletions

View File

@@ -808,6 +808,9 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st,
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;