summaryrefslogtreecommitdiff
path: root/gst/mpegtsmux
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2015-09-30 00:36:14 +0100
committerTim-Philipp Müller <tim@centricular.com>2015-09-30 00:43:26 +0100
commit5bf7432f81a095f55f89aa65b4f9f27335e2b747 (patch)
tree39f590ef20b2b6e2037cc549c147c9b2dbdde04b /gst/mpegtsmux
parent28b2ac7e65274fd99c017f54c6d7a239bead7901 (diff)
mpegtsmux: fix downstream key unit events handling with hlssink
The buffer timestamps in the collect function will already be running time, don't try to convert them again to running time, this would yield CLOCK_TIME_NONE now that the segment is shifted to account for negative dts. This fixes x264enc ! mpegtsmux ! hlssink, which was broken because mpegtsmux would send a downstream key unit event with running time NONE and then hlssink would immediately send another one upstream and it would just be a flood of force keyframe events in both directions after the first one. This would then break hlssink because it uses multifilesink in next-file=key-unit-event mode, and starting a new file after every few kB does not work well for HLS.
Diffstat (limited to 'gst/mpegtsmux')
-rw-r--r--gst/mpegtsmux/mpegtsmux.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gst/mpegtsmux/mpegtsmux.c b/gst/mpegtsmux/mpegtsmux.c
index c3a0dbb85..ce00333dc 100644
--- a/gst/mpegtsmux/mpegtsmux.c
+++ b/gst/mpegtsmux/mpegtsmux.c
@@ -997,8 +997,7 @@ check_pending_key_unit_event (GstEvent * pending_event, GstSegment * segment,
timestamp == GST_CLOCK_TIME_NONE)
goto out;
- running_time = gst_segment_to_running_time (segment,
- GST_FORMAT_TIME, timestamp);
+ running_time = timestamp;
GST_INFO ("now %" GST_TIME_FORMAT " wanted %" GST_TIME_FORMAT,
GST_TIME_ARGS (running_time), GST_TIME_ARGS (pending_key_unit_ts));