Commit bd239c9a authored by Michael Niedermayer's avatar Michael Niedermayer Committed by Martin Storsjö

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: 's avatarMartin Storsjö <martin@martin.st>
parent 1d4579e3
......@@ -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) {
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment