diff options
Diffstat (limited to 'libhb/sync.c')
-rw-r--r-- | libhb/sync.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/libhb/sync.c b/libhb/sync.c index 9c202c250..f5ef07776 100644 --- a/libhb/sync.c +++ b/libhb/sync.c @@ -234,7 +234,9 @@ void syncVideoClose( hb_work_object_t * w ) if ( --pv->common->ref == 0 ) { hb_unlock( pv->common->mutex ); + hb_cond_close( &pv->common->next_frame ); hb_lock_close( &pv->common->mutex ); + free( pv->common->first_pts ); free( pv->common ); } else @@ -360,12 +362,12 @@ int syncVideoWork( hb_work_object_t * w, hb_buffer_t ** buf_in, if( !sync->cur ) { sync->cur = next; - if( sync->cur->size == 0 ) + if (next->size == 0) { /* we got an end-of-stream as our first video packet? * Feed it downstream & signal that we're done. */ - *buf_out = hb_buffer_init( 0 ); + *buf_out = next; pv->common->start_found = 1; pv->common->first_pts[0] = INT64_MAX - 1; @@ -666,7 +668,9 @@ void syncAudioClose( hb_work_object_t * w ) if ( --pv->common->ref == 0 ) { hb_unlock( pv->common->mutex ); + hb_cond_close( &pv->common->next_frame ); hb_lock_close( &pv->common->mutex ); + free( pv->common->first_pts ); free( pv->common ); } else @@ -940,6 +944,7 @@ static void InitAudio( hb_job_t * job, hb_sync_common_t * common, int i ) default: { // Never gets here + codec = NULL; // Silence compiler warning } break; } @@ -1292,7 +1297,7 @@ static void UpdateSearchState( hb_work_object_t * w, int64_t start ) } if (now > sync->st_first) { - int eta; + int eta = 0; if ( pv->job->frame_to_start ) { |