From bd239c9a2e151c0aeeb653a571f130aae7320894 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 16 Nov 2011 01:19:35 +0100 Subject: lavf: Don't drop both pts and dts if timestamps are invalid MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In these cases, only drop dts. Because if we drop both we have no timestamps at all for some files. This improves playback of HLS streams from GoPro cameras. Signed-off-by: Martin Storsjö --- libavformat/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavformat/utils.c') diff --git a/libavformat/utils.c b/libavformat/utils.c index 8757c101a3..ffad92f040 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -616,7 +616,7 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st, if (delay == 1 && pkt->dts == pkt->pts && pkt->dts != AV_NOPTS_VALUE && presentation_delayed) { av_log(s, AV_LOG_DEBUG, "invalid dts/pts combination\n"); - pkt->dts = pkt->pts = AV_NOPTS_VALUE; + pkt->dts = AV_NOPTS_VALUE; } if (pkt->duration == 0 && st->codec->codec_type != AVMEDIA_TYPE_AUDIO) { -- cgit v1.2.3