aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-11-16 01:19:35 +0100
committerMartin Storsjö <martin@martin.st>2014-10-12 01:32:52 +0300
commitbd239c9a2e151c0aeeb653a571f130aae7320894 (patch)
treed95ffb30ade45e2e5063ea187b4a0fe83c67ee57 /libavformat
parent1d4579e38ecad578c86516fad2837a273d11b320 (diff)
downloadffmpeg-bd239c9a2e151c0aeeb653a571f130aae7320894.tar.gz
lavf: Don't drop both pts and dts if timestamps are invalid
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ö <martin@martin.st>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/utils.c2
1 files changed, 1 insertions, 1 deletions
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) {