summaryrefslogtreecommitdiffstats
path: root/libhb/deca52.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/deca52.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/deca52.c')
-rw-r--r--libhb/deca52.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libhb/deca52.c b/libhb/deca52.c
index 015d00b39..925e824b2 100644
--- a/libhb/deca52.c
+++ b/libhb/deca52.c
@@ -232,7 +232,7 @@ static int deca52Work( hb_work_object_t * w, hb_buffer_t ** buf_in,
return HB_WORK_DONE;
}
- if ( (*buf_in)->s.start < -1 && pv->next_expected_pts == 0 )
+ if ( (*buf_in)->s.start < 0 && pv->next_expected_pts == 0 )
{
// discard buffers that start before video time 0
*buf_out = NULL;
@@ -331,15 +331,15 @@ static hb_buffer_t* Decode(hb_work_object_t *w)
// spec says that the PTS is the start time of the first frame
// that starts in the PES frame so we only use the PTS once then
// get the following frames' PTS from the frame length.
- ipts = -1;
+ ipts = AV_NOPTS_VALUE;
}
double frame_dur = (6. * 256. * 90000.) / pv->rate;
double pts;
- if (hb_gui_use_hwd_flag == 1 && ipts != -1)
+ if (hb_gui_use_hwd_flag == 1 && ipts != AV_NOPTS_VALUE)
pts = ((double)ipts >= pv->next_expected_pts) ? (double)ipts : pv->next_expected_pts;
else
- pts = (ipts != -1) ? (double)ipts : pv->next_expected_pts;
+ pts = (ipts != AV_NOPTS_VALUE) ? (double)ipts : pv->next_expected_pts;
/* AC3 passthrough: don't decode the AC3 frame */
if (audio->config.out.codec == HB_ACODEC_AC3_PASS)