From f4f1883326f313b3e46b69c570f88d5101f32b12 Mon Sep 17 00:00:00 2001 From: Kieran Kunhya Date: Thu, 14 Jul 2011 17:54:57 +0100 Subject: [PATCH] Make output PCR list not wrap around. --- libmpegts.c | 2 +- libmpegts.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/libmpegts.c b/libmpegts.c index 6266fdf..262ade3 100644 --- a/libmpegts.c +++ b/libmpegts.c @@ -1349,7 +1349,7 @@ int increase_pcr( ts_writer_t *w, int num_packets, int imaginary ) pcr = (int64_t)((8.0 * w->packets_written * TS_PACKET_SIZE / w->ts_muxrate) * TS_CLOCK + 0.5); pcr += TS_START * TS_CLOCK; - w->pcr_list[w->num_pcrs++] = pcr % mod; + w->pcr_list[w->num_pcrs++] = pcr; } return 0; diff --git a/libmpegts.h b/libmpegts.h index d86e01a..3a49659 100644 --- a/libmpegts.h +++ b/libmpegts.h @@ -650,6 +650,7 @@ typedef struct * libmpegts buffers one frame so the last set of packets can be output by setting num_frames = 0. * * pcr_list contains an array of pcr values, one for each output packet. The array length is len/188. + * NOTE: This PCR list does not wrap around * */