[Bug 674536] tsdemux: Freeze on pts-wrap with streaming sources
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Sun Apr 22 13:16:22 PDT 2012
https://bugzilla.gnome.org/show_bug.cgi?id=674536
GStreamer | gst-plugins-bad | git
--- Comment #2 from Julian Scheel <julian at jusst.de> 2012-04-22 20:16:17 UTC ---
I tracked things a bit further and figured out, that the difference between
file- and udp- or httpsrc is in mpegtspacketizer. The function
mpegts_packetizer_pts_to_ts uses calculated clock skew if available. This is
the case for udp and http. If this is not available the pcr observations are
used. This is the case with filesrc. In the case of pcr observation usage
rollovers are handled and hence the computed timestamp is continuous in the
end. In the clock skew case rollover is not handled and after the rollover
happens the timestamp jumps from the continuous timestamps starting at 0 to the
timestamp actually included in the pes. I don't really understand how the clock
skew part is handled at all and in which way the rollover should be handled
there.
I simply disable usage of computed clock skew completely for now, which seems
to work around the problem:
diff --git a/gst/mpegtsdemux/mpegtspacketizer.c
b/gst/mpegtsdemux/mpegtspacketizer.c
index 41ff6dd..8cc66d1 100644
--- a/gst/mpegtsdemux/mpegtspacketizer.c
+++ b/gst/mpegtsdemux/mpegtspacketizer.c
@@ -3208,6 +3208,7 @@ mpegts_packetizer_pts_to_ts (MpegTSPacketizer2 *
packetizer, GstClockTime pts)
{
GstClockTime res = GST_CLOCK_TIME_NONE;
+#if 0
/* Use clock skew if present */
if (packetizer->calculate_skew
&& GST_CLOCK_TIME_IS_VALID (packetizer->base_time)) {
@@ -3217,6 +3218,7 @@ mpegts_packetizer_pts_to_ts (MpegTSPacketizer2 *
packetizer, GstClockTime pts)
res = pts - packetizer->base_pcrtime + packetizer->base_time +
packetizer->skew;
} else
+#endif
/* If not, use pcr observations */
if (packetizer->calculate_offset && packetizer->priv->first_pcr != -1) {
/* Rollover */
Still I think someone who is familiar with the calculated clock skew and why it
is actually there should take a look and suggest a real solution instead of
just disabling it.
If I come up with a better thought in the meantime, I will post it here.
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list