pv->common = calloc( 1, sizeof( hb_sync_common_t ) );
pv->common->ref++;
pv->common->mutex = hb_lock_init();
- pv->common->audio_pts_thresh = 0;
+ pv->common->audio_pts_thresh = -1;
pv->common->next_frame = hb_cond_init();
pv->common->pts_count = 1;
if ( job->frame_to_start || job->pts_to_start )
*/
if( subtitle->source == CC608SUB ||
subtitle->source == CC708SUB ||
- subtitle->source == SRTSUB )
+ subtitle->source == SRTSUB ||
+ subtitle->source == UTF8SUB ||
+ subtitle->source == TX3GSUB ||
+ subtitle->source == SSASUB)
{
/*
* Rewrite timestamps on subtitles that came from Closed Captions
hb_lock( pv->common->mutex );
while ( !pv->common->start_found )
{
+ if ( pv->common->audio_pts_thresh < 0 )
+ {
+ // I would initialize this in hb_sync_init, but
+ // job->pts_to_start can be modified by reader
+ // after hb_sync_init is called.
+ pv->common->audio_pts_thresh = job->pts_to_start;
+ }
if ( buf->start < pv->common->audio_pts_thresh )
{
hb_buffer_close( &buf );