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
This commit is contained in:
Tim-Philipp Müller 2015-08-23 23:38:21 +01:00
parent 88d7b22d40
commit 54fc1ed5f4

View file

@ -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);