int len, int64_t dts, int duration, int channels, int sri,
int errors)
{
- th_pkt_t *pkt = pkt_alloc(st->es_type, buf, len, dts, dts);
+ th_pkt_t *pkt = pkt_alloc(st->es_type, buf, len, dts, dts, t->s_current_pcr);
pkt->pkt_commercial = t->s_tt_commercial_advice;
pkt->pkt_duration = duration;
if(st->es_curpkt != NULL)
pkt_ref_dec(st->es_curpkt);
- pkt = pkt_alloc(st->es_type, NULL, 0, st->es_curpts, st->es_curdts);
+ pkt = pkt_alloc(st->es_type, NULL, 0, st->es_curpts, st->es_curdts, t->s_current_pcr);
pkt->v.pkt_frametype = frametype;
pkt->pkt_duration = st->es_frame_duration;
pkt->pkt_commercial = t->s_tt_commercial_advice;
if (st->es_frame_duration == 0)
st->es_frame_duration = 1;
- pkt = pkt_alloc(st->es_type, NULL, 0, st->es_curpts, st->es_curdts);
+ pkt = pkt_alloc(st->es_type, NULL, 0, st->es_curpts, st->es_curdts, t->s_current_pcr);
pkt->v.pkt_frametype = pkttype;
pkt->v.pkt_field = isfield;
pkt->pkt_duration = st->es_frame_duration;
if (r > 0)
return PARSER_APPEND;
- st->es_curpkt = pkt_alloc(st->es_type, NULL, 0, st->es_curpts, st->es_curdts);
+ st->es_curpkt = pkt_alloc(st->es_type, NULL, 0, st->es_curpts, st->es_curdts, t->s_current_pcr);
st->es_curpkt->v.pkt_frametype = pkttype;
st->es_curpkt->v.pkt_field = 0;
st->es_curpkt->pkt_duration = st->es_frame_duration;
// end_of_PES_data_field_marker
if(buf[psize - 1] == 0xff) {
- pkt = pkt_alloc(st->es_type, buf, psize - 1, st->es_curpts, st->es_curdts);
+ pkt = pkt_alloc(st->es_type, buf, psize - 1, st->es_curpts, st->es_curdts, t->s_current_pcr);
pkt->pkt_commercial = t->s_tt_commercial_advice;
pkt->pkt_err = st->es_buf.sb_err;
parser_deliver(t, st, pkt);
if(psize >= 46 && t->s_current_pcr != PTS_UNSET) {
teletext_input((mpegts_service_t *)t, st, buf, psize);
- pkt = pkt_alloc(st->es_type, buf, psize, t->s_current_pcr, t->s_current_pcr);
+ pkt = pkt_alloc(st->es_type, buf, psize, t->s_current_pcr, t->s_current_pcr, t->s_current_pcr);
pkt->pkt_commercial = t->s_tt_commercial_advice;
pkt->pkt_err = st->es_buf.sb_err;
parser_deliver(t, st, pkt);
if (!st->es_buf.sb_err)
return;
- pkt = pkt_alloc(st->es_type, NULL, 0, PTS_UNSET, PTS_UNSET);
+ pkt = pkt_alloc(st->es_type, NULL, 0, PTS_UNSET, PTS_UNSET, t->s_current_pcr);
pkt->pkt_err = st->es_buf.sb_err;
parser_deliver(t, st, pkt);
st->es_buf.sb_err = 0;
extra_size = 7;
}
- n = pkt_alloc(ts->ts_type, NULL, packet.size + extra_size, packet.pts, packet.pts);
+ n = pkt_alloc(ts->ts_type, NULL, packet.size + extra_size, packet.pts, packet.pts, packet.pts);
memcpy(pktbuf_ptr(n->pkt_payload) + extra_size, packet.data, packet.size);
n->pkt_componentindex = ts->ts_index;
if ((ts->ts_type == SCT_H264 || ts->ts_type == SCT_HEVC) &&
octx->extradata_size &&
(ts->ts_first || octx->coded_frame->pict_type == AV_PICTURE_TYPE_I)) {
- n = pkt_alloc(ts->ts_type, NULL, octx->extradata_size + epkt->size, epkt->pts, epkt->dts);
+ n = pkt_alloc(ts->ts_type, NULL, octx->extradata_size + epkt->size, epkt->pts, epkt->dts, epkt->dts);
memcpy(pktbuf_ptr(n->pkt_payload), octx->extradata, octx->extradata_size);
memcpy(pktbuf_ptr(n->pkt_payload) + octx->extradata_size, epkt->data, epkt->size);
ts->ts_first = 0;
} else {
- n = pkt_alloc(ts->ts_type, epkt->data, epkt->size, epkt->pts, epkt->dts);
+ n = pkt_alloc(ts->ts_type, epkt->data, epkt->size, epkt->pts, epkt->dts, epkt->dts);
}
switch (octx->coded_frame->pict_type) {
if (!vs->vid_first_sent) {
/* notify global headers that we're live */
/* the video packets might be delayed */
- pkt2 = pkt_alloc(ts->ts_type, NULL, 0, pkt->pkt_pts, pkt->pkt_dts);
+ pkt2 = pkt_alloc(ts->ts_type, NULL, 0, pkt->pkt_pts, pkt->pkt_dts, pkt->pkt_dts);
pkt2->pkt_componentindex = pkt->pkt_componentindex;
sm = streaming_msg_create_pkt(pkt2);
streaming_target_deliver2(ts->ts_target, sm);