From d9d3bd95e52a81d25bd5bb3edd4fdb6f68c68daa Mon Sep 17 00:00:00 2001 From: John Cox Date: Tue, 30 Apr 2013 14:08:22 +0100 Subject: [PATCH] Fix issue with PCR calculation after the last PCR The base for the linear interpolation was left as the previous PCR rather than the last PCR --- ts.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ts.c b/ts.c index 7c23da3..e2fb7e5 100644 --- a/ts.c +++ b/ts.c @@ -1742,6 +1742,8 @@ extern int read_next_TS_packet_from_buffer(TS_reader_p tsreader, // so our second best choice is to "play out" using the last // known PCR rate-of-change. tsreader->pcrbuf->TS_had_EOF = TRUE; // remember we're playing out + // Must move PCR start + tsreader->pcrbuf->TS_buffer_prev_pcr = tsreader->pcrbuf->TS_buffer_end_pcr; // If we read nothing we must die now if (tsreader->pcrbuf->TS_buffer_next == tsreader->pcrbuf->TS_buffer_len) return err;