From 77bafb4dbca76fe160acd76a8bd3811e9c57cbaf Mon Sep 17 00:00:00 2001 From: Anton Gritsay Date: Mon, 18 Mar 2013 08:15:00 +0000 Subject: [PATCH] mpegtsmux: parse force key unit events with the correct function Otherwise it won't be parsed and bogus values would be used. https://bugzilla.gnome.org/show_bug.cgi?id=696032 --- gst/mpegtsmux/mpegtsmux.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/gst/mpegtsmux/mpegtsmux.c b/gst/mpegtsmux/mpegtsmux.c index 975c9263a0..931cca48de 100644 --- a/gst/mpegtsmux/mpegtsmux.c +++ b/gst/mpegtsmux/mpegtsmux.c @@ -1004,8 +1004,15 @@ check_pending_key_unit_event (GstEvent * pending_event, GstSegment * segment, stream_time = gst_segment_to_stream_time (segment, GST_FORMAT_TIME, timestamp); - gst_video_event_parse_upstream_force_key_unit (pending_event, - NULL, &all_headers, &count); + if (GST_EVENT_TYPE (pending_event) == GST_EVENT_CUSTOM_DOWNSTREAM) { + gst_video_event_parse_downstream_force_key_unit (pending_event, + NULL, NULL, NULL, &all_headers, &count); + } else { + g_return_val_if_fail (GST_EVENT_TYPE (pending_event) == + GST_EVENT_CUSTOM_UPSTREAM, NULL); + gst_video_event_parse_upstream_force_key_unit (pending_event, NULL, + &all_headers, &count); + } event = gst_video_event_new_downstream_force_key_unit (timestamp, stream_time,