From a86b3d032c3efc50a1d81a0ad6bc47781bd0833b Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Wed, 4 Jun 2014 21:31:21 +1000 Subject: [PATCH] mpegtspacketiser: Always initialise packet AFC flags and PCR fields Also fix a slight typo in a comment about the smoothing algorithm --- gst/mpegtsdemux/mpegtspacketizer.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gst/mpegtsdemux/mpegtspacketizer.c b/gst/mpegtsdemux/mpegtspacketizer.c index ba347cff24..53a5280014 100644 --- a/gst/mpegtsdemux/mpegtspacketizer.c +++ b/gst/mpegtsdemux/mpegtspacketizer.c @@ -453,9 +453,13 @@ mpegts_packetizer_parse_packet (MpegTSPacketizer2 * packetizer, packet->data = data; - if (FLAGS_HAS_AFC (tmp)) + packet->afc_flags = 0; + packet->pcr = G_MAXUINT64; + + if (FLAGS_HAS_AFC (tmp)) { if (!mpegts_packetizer_parse_adaptation_field_control (packetizer, packet)) return FALSE; + } if (FLAGS_HAS_PAYLOAD (tmp)) packet->payload = packet->data; @@ -1200,7 +1204,7 @@ mpegts_packetizer_resync (MpegTSPCR * pcr, GstClockTime time, * * J = N + n * - * N : a constant network delay. + * D : a constant network delay. * n : random added noise. The noise is concentrated around 0 * * In the receiver we can track the elapsed time at the sender with: