summaryrefslogtreecommitdiffstats
path: root/libhb/muxavformat.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/muxavformat.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/muxavformat.c')
-rw-r--r--libhb/muxavformat.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/libhb/muxavformat.c b/libhb/muxavformat.c
index 7766d9854..277e15992 100644
--- a/libhb/muxavformat.c
+++ b/libhb/muxavformat.c
@@ -48,7 +48,7 @@ struct hb_mux_object_s
int ntracks;
hb_mux_data_t ** tracks;
- int delay;
+ int64_t delay;
};
enum
@@ -130,7 +130,7 @@ static int avformatInit( hb_mux_object_t * m )
char *lang;
- m->delay = -1;
+ m->delay = AV_NOPTS_VALUE;
max_tracks = 1 + hb_list_count( job->list_audio ) +
hb_list_count( job->list_subtitle );
@@ -951,20 +951,20 @@ static void computeDelay(hb_mux_object_t *m)
static int avformatMux(hb_mux_object_t *m, hb_mux_data_t *track, hb_buffer_t *buf)
{
AVPacket pkt;
- int64_t dts, pts, duration = -1;
+ int64_t dts, pts, duration = AV_NOPTS_VALUE;
hb_job_t *job = m->job;
uint8_t tx3g_out[2048];
- if (m->delay == -1)
+ if (m->delay == AV_NOPTS_VALUE)
{
computeDelay(m);
}
if (buf != NULL)
{
- if (buf->s.start != -1)
+ if (buf->s.start != AV_NOPTS_VALUE)
buf->s.start += m->delay;
- if (buf->s.renderOffset != -1)
+ if (buf->s.renderOffset != AV_NOPTS_VALUE)
buf->s.renderOffset += m->delay;
}
@@ -981,7 +981,7 @@ static int avformatMux(hb_mux_object_t *m, hb_mux_data_t *track, hb_buffer_t *bu
if (buf == NULL)
return 0;
- if (buf->s.renderOffset == -1)
+ if (buf->s.renderOffset == AV_NOPTS_VALUE)
{
dts = av_rescale_q(buf->s.start, (AVRational){1,90000},
track->st->time_base);