From c98c5176cee6f616d74c9c7acf10f55e88f9c6e9 Mon Sep 17 00:00:00 2001 From: Hendrik Leppkes Date: Wed, 28 Oct 2015 14:30:30 +0100 Subject: asfdec: don't subtract the pre-roll from index entries Empiric analysis of a variety of samples has concluded that the index entries are written without the preroll. --- libavformat/asfdec_f.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/asfdec_f.c b/libavformat/asfdec_f.c index be09a92bd1..d4b6f10582 100644 --- a/libavformat/asfdec_f.c +++ b/libavformat/asfdec_f.c @@ -1606,7 +1606,7 @@ static int asf_build_simple_index(AVFormatContext *s, int stream_index) int pktnum = avio_rl32(s->pb); int pktct = avio_rl16(s->pb); int64_t pos = s->internal->data_offset + s->packet_size * (int64_t)pktnum; - int64_t index_pts = FFMAX(av_rescale(itime, i, 10000) - asf->hdr.preroll, 0); + int64_t index_pts = FFMAX(av_rescale(itime, i, 10000), 0); if (pos != last_pos) { av_log(s, AV_LOG_DEBUG, "pktnum:%d, pktct:%d pts: %"PRId64"\n", -- cgit v1.2.3