summaryrefslogtreecommitdiffstats
path: root/libhb/sync.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2010-10-29 16:17:48 +0000
committerjstebbins <[email protected]>2010-10-29 16:17:48 +0000
commit1c0951a0d7d23dd2f85efa83f87ed3a59ec78737 (patch)
tree4879723563ecf4c0caa4c3fdd426d57ad2b3cf64 /libhb/sync.c
parentb6fa57df362e427de28ae05d043fe6795260aca0 (diff)
fix a segfault and a deadlock if reader exits befor first buffer sent
This can happen if enough of the source is good that it scans but the beginning has an error that causes reader to exit. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3628 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/sync.c')
-rw-r--r--libhb/sync.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libhb/sync.c b/libhb/sync.c
index acc782e4a..57809d7e2 100644
--- a/libhb/sync.c
+++ b/libhb/sync.c
@@ -327,7 +327,7 @@ int syncVideoWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
}
/* Wait till we can determine the initial pts of all streams */
- if( pv->common->pts_offset == INT64_MIN )
+ if( next->size != 0 && pv->common->pts_offset == INT64_MIN )
{
pv->common->first_pts[0] = next->start;
hb_lock( pv->common->mutex );