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
master
John Cox 2013-04-30 14:08:22 +01:00
rodzic d5f44ce278
commit d9d3bd95e5
1 zmienionych plików z 2 dodań i 0 usunięć

2
ts.c
Wyświetl plik

@ -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;