@@ -1782,8 +1782,15 @@ static void scte_data_cb(MpegTSFilter *filter, const uint8_t *section,
prg = av_find_program_from_stream(ts->stream, NULL, idx);
if (prg && prg->pcr_pid != -1 && prg->discard != AVDISCARD_ALL) {
MpegTSFilter *f = ts->pids[prg->pcr_pid];
- if (f && f->last_pcr != -1)
+ if (f && f->last_pcr != -1) {
+ int64_t *orig_pts;
ts->pkt->pts = ts->pkt->dts = f->last_pcr/300;
+ orig_pts = (int64_t *) av_packet_new_side_data(ts->pkt,
+ AV_PKT_DATA_ORIG_PTS,
+ sizeof(int64_t));
+ if (orig_pts)
+ *orig_pts = ts->pkt->pts;
+ }
}
ts->stop_parse = 1;
We need the original PTS value in order to do subsequent processing, so set it as packet side data. Signed-off-by: Devin Heitmueller <dheitmueller@ltnglobal.com> --- libavformat/mpegts.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)