summaryrefslogtreecommitdiffstats
path: root/libhb/sync.c
diff options
context:
space:
mode:
Diffstat (limited to 'libhb/sync.c')
-rw-r--r--libhb/sync.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/libhb/sync.c b/libhb/sync.c
index 3b0ee7e19..c95f9ad26 100644
--- a/libhb/sync.c
+++ b/libhb/sync.c
@@ -129,7 +129,7 @@ hb_work_object_t * hb_sync_init( hb_job_t * job )
pv->common = calloc( 1, sizeof( hb_sync_common_t ) );
pv->common->ref++;
pv->common->mutex = hb_lock_init();
- pv->common->audio_pts_thresh = -1;
+ pv->common->audio_pts_thresh = AV_NOPTS_VALUE;
pv->common->next_frame = hb_cond_init();
pv->common->pts_count = 1;
if ( job->frame_to_start || job->pts_to_start )
@@ -316,7 +316,7 @@ static hb_buffer_t * mergeSubtitles(subtitle_sanitizer_t *sanitizer, int end)
a->next = NULL;
buf = a;
}
- else if (a != NULL && a->s.stop != -1)
+ else if (a != NULL && a->s.stop != AV_NOPTS_VALUE)
{
b = a->next;
@@ -345,7 +345,7 @@ static hb_buffer_t * mergeSubtitles(subtitle_sanitizer_t *sanitizer, int end)
sprintf((char*)buf->data, "%s\n%s", a->data, b->data);
hb_buffer_close(&a);
- if (b->s.stop != -1 && ABS(b->s.stop - b->s.start) <= 18000)
+ if (b->s.stop != AV_NOPTS_VALUE && ABS(b->s.stop - b->s.start) <= 18000)
{
// b and a completely overlap, remove b
sanitizer->list_current = b->next;
@@ -374,10 +374,10 @@ static hb_buffer_t * mergeSubtitles(subtitle_sanitizer_t *sanitizer, int end)
if (buf != NULL)
{
- if (buf->s.stop != -1)
+ if (buf->s.stop != AV_NOPTS_VALUE)
buf->s.duration = buf->s.stop - buf->s.start;
else
- buf->s.duration = -1;
+ buf->s.duration = AV_NOPTS_VALUE;
if (last == NULL)
{
out = last = buf;
@@ -416,13 +416,13 @@ static hb_buffer_t * sanitizeSubtitle(
hb_lock( pv->common->mutex );
sub->s.start -= pv->common->video_pts_slip;
- if (sub->s.stop != -1)
+ if (sub->s.stop != AV_NOPTS_VALUE)
sub->s.stop -= pv->common->video_pts_slip;
- if (sub->s.renderOffset != -1)
+ if (sub->s.renderOffset != AV_NOPTS_VALUE)
sub->s.renderOffset -= pv->common->video_pts_slip;
hb_unlock( pv->common->mutex );
- if (sanitizer->last != NULL && sanitizer->last->s.stop == -1)
+ if (sanitizer->last != NULL && sanitizer->last->s.stop == AV_NOPTS_VALUE)
{
sanitizer->last->s.stop = sub->s.start;
}
@@ -845,7 +845,7 @@ int syncVideoWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
sync->cur = cur = next;
cur->sub = NULL;
cur->s.start -= pv->common->video_pts_slip;
- if (cur->s.renderOffset != -1)
+ if (cur->s.renderOffset != AV_NOPTS_VALUE)
cur->s.renderOffset -= pv->common->video_pts_slip;
cur->s.stop -= pv->common->video_pts_slip;
sync->pts_skip = 0;