MCPcopy Create free account
hub / github.com/HandBrake/HandBrake / shiftTS

Function shiftTS

libhb/sync.c:256–288  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

254}
255
256static void shiftTS( sync_common_t * common, int64_t delta )
257{
258 int ii, jj;
259
260 scrSlip(common, delta);
261 for (ii = 0; ii < common->stream_count; ii++)
262 {
263 hb_buffer_t * buf = NULL;
264 sync_stream_t * stream = &common->streams[ii];
265 int count = hb_list_count(stream->in_queue);
266
267 for (jj = 0; jj < count; jj++)
268 {
269 buf = hb_list_item(stream->in_queue, jj);
270 if (buf->s.start != AV_NOPTS_VALUE)
271 {
272 buf->s.start -= delta;
273 }
274 if (buf->s.stop != AV_NOPTS_VALUE)
275 {
276 buf->s.stop -= delta;
277 }
278 }
279 if (buf != NULL && buf->s.start != AV_NOPTS_VALUE)
280 {
281 stream->last_scr_pts = buf->s.start + buf->s.duration;
282 }
283 else
284 {
285 stream->last_scr_pts = (int64_t)AV_NOPTS_VALUE;
286 }
287 }
288}
289
290static hb_buffer_t * CreateSilenceBuf( sync_stream_t * stream,
291 int64_t dur, int64_t pts )

Callers 1

OutputBufferFunction · 0.85

Calls 3

scrSlipFunction · 0.85
hb_list_countFunction · 0.85
hb_list_itemFunction · 0.85

Tested by

no test coverage detected