From 54fc1ed5f4c5ee682799dcb4b7953a7607d87964 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Sun, 23 Aug 2015 23:38:21 +0100 Subject: [PATCH] tsdemux: fix latency handling again The tsdemux latency should always be added to the minimum latency (which is always a valid clock time value). The "cleanup" in commit a1f709c2 made it so that it would not be added if upstream reported 0 as minimum latency (as e.g. udpsrc would). This broke playback of live mpeg-ts streaming in some cases, leading to playback stutter due to a too-small configured latency for the pipeline. https://bugzilla.gnome.org/show_bug.cgi?id=751508 --- gst/mpegtsdemux/tsdemux.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gst/mpegtsdemux/tsdemux.c b/gst/mpegtsdemux/tsdemux.c index 217d5ad..8971bc8 100644 --- a/gst/mpegtsdemux/tsdemux.c +++ b/gst/mpegtsdemux/tsdemux.c @@ -523,8 +523,7 @@ gst_ts_demux_srcpad_query (GstPad * pad, GstObject * parent, GstQuery * query) PTS/DTS. We therefore allow a latency of 700ms for that. */ gst_query_parse_latency (query, &live, &min_lat, &max_lat); - if (min_lat) - min_lat += TS_LATENCY; + min_lat += TS_LATENCY; if (GST_CLOCK_TIME_IS_VALID (max_lat)) max_lat += TS_LATENCY; gst_query_set_latency (query, live, min_lat, max_lat); -- 2.7.4