summaryrefslogtreecommitdiffstats
path: root/libhb/decvobsub.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2014-01-26 18:01:50 +0000
committerjstebbins <[email protected]>2014-01-26 18:01:50 +0000
commit96fbc744385ddcc15617ba449d1521c30f66da3d (patch)
tree00a351c416a2307e511042d0a86bf4d3a2bfe7d1 /libhb/decvobsub.c
parent1d7db22df59be148ed995eee7755f21d8f0b9d5b (diff)
Replace invaled timestamp flag "-1" with AV_NOPTS
-1 is not a good value as a flag for invalid timestamps. There are cases where small negative timestamps are useful. So this eliminates a potential ambiguity. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6001 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/decvobsub.c')
-rw-r--r--libhb/decvobsub.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libhb/decvobsub.c b/libhb/decvobsub.c
index 3b6c3cb79..605e22a94 100644
--- a/libhb/decvobsub.c
+++ b/libhb/decvobsub.c
@@ -177,7 +177,7 @@ int decsubWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
pv->size_got = 0;
pv->size_rle = 0;
- if ( pv->pts_stop != -1 )
+ if ( pv->pts_stop != AV_NOPTS_VALUE )
{
// If we don't get a valid next timestamp, use the stop time
// of the current sub as the start of the next.
@@ -225,8 +225,8 @@ static void ParseControls( hb_work_object_t * w )
int command;
int date, next;
- pv->pts_start = -1;
- pv->pts_stop = -1;
+ pv->pts_start = AV_NOPTS_VALUE;
+ pv->pts_stop = AV_NOPTS_VALUE;
pv->pts_forced = 0;
pv->alpha[3] = 0;
@@ -271,7 +271,7 @@ static void ParseControls( hb_work_object_t * w )
break;
case 0x02: // 0x02 - STP_DSP - Stop Display, no arguments
- if(pv->pts_stop == -1)
+ if(pv->pts_stop == AV_NOPTS_VALUE)
pv->pts_stop = pv->pts + date * 1024;
break;
@@ -347,7 +347,7 @@ static void ParseControls( hb_work_object_t * w )
}
// fading-out
- if( currAlpha < lastAlpha && pv->pts_stop == -1 )
+ if (currAlpha < lastAlpha && pv->pts_stop == AV_NOPTS_VALUE)
{
pv->pts_stop = pv->pts + date * 1024;
}
@@ -382,7 +382,7 @@ static void ParseControls( hb_work_object_t * w )
i = next;
}
// Generate timestamps if they are not set
- if( pv->pts_start == -1 )
+ if( pv->pts_start == AV_NOPTS_VALUE )
{
// Set pts to end of last sub if the start time is unknown.
pv->pts_start = pv->pts;