diff options
author | John Stebbins <[email protected]> | 2017-02-18 14:11:17 -0700 |
---|---|---|
committer | John Stebbins <[email protected]> | 2017-02-18 14:13:17 -0700 |
commit | 6fec4838373fd50520a2499ff143c50e5d323f9f (patch) | |
tree | 1677c9ecfa84011325effbf84ad57f58af03445a /libhb | |
parent | 1443d9c4589f681e670a240581a6d8078a7b860d (diff) |
sync: fix sync problem with delayed streams
If a stream is delayed by a large amount and the first timestamp from
the stream is AV_NOPTS_VALUE, sync assumed a 0 timestamp which caused
loss of sync. Drop the buffer instead.
Diffstat (limited to 'libhb')
-rw-r--r-- | libhb/sync.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libhb/sync.c b/libhb/sync.c index 9bc94de02..f199feff8 100644 --- a/libhb/sync.c +++ b/libhb/sync.c @@ -1761,12 +1761,12 @@ static int UpdateSCR( sync_stream_t * stream, hb_buffer_t * buf ) { // This should happen extremely rarely if ever. // But if we get here, this is the first buffer received for - // this stream. Normally, some buffers will be queued for + // this stream. Normally, some buffers will be queued for // every stream before we ever call UpdateSCR. - // We don't really know what it's timestamp should be, - // but 0 is a good guess. - buf->s.start = 0; - last_scr_pts = buf->s.start; + // We don't really know what it's timestamp should be. + // So drop the buffer. + hb_buffer_close(&buf); + return 0; } if (buf->s.stop != AV_NOPTS_VALUE) { |