Commit 6b42569d authored by Xavier Claessens's avatar Xavier Claessens Committed by Jan Schmidt

splitmuxsink: Correctly catch FLUSH events in probes

https://bugzilla.gnome.org/show_bug.cgi?id=767498
parent 50a4b5bc
...@@ -807,7 +807,8 @@ handle_mq_output (GstPad * pad, GstPadProbeInfo * info, MqStreamCtx * ctx) ...@@ -807,7 +807,8 @@ handle_mq_output (GstPad * pad, GstPadProbeInfo * info, MqStreamCtx * ctx)
g_warning ("Buffer list handling not implemented"); g_warning ("Buffer list handling not implemented");
return GST_PAD_PROBE_DROP; return GST_PAD_PROBE_DROP;
} }
if (info->type & GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM) { if (info->type & GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM ||
info->type & GST_PAD_PROBE_TYPE_EVENT_FLUSH) {
GstEvent *event = gst_pad_probe_info_get_event (info); GstEvent *event = gst_pad_probe_info_get_event (info);
gboolean locked = FALSE; gboolean locked = FALSE;
...@@ -1371,7 +1372,8 @@ handle_mq_input (GstPad * pad, GstPadProbeInfo * info, MqStreamCtx * ctx) ...@@ -1371,7 +1372,8 @@ handle_mq_input (GstPad * pad, GstPadProbeInfo * info, MqStreamCtx * ctx)
g_warning ("Buffer list handling not implemented"); g_warning ("Buffer list handling not implemented");
return GST_PAD_PROBE_DROP; return GST_PAD_PROBE_DROP;
} }
if (info->type & GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM) { if (info->type & GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM ||
info->type & GST_PAD_PROBE_TYPE_EVENT_FLUSH) {
GstEvent *event = gst_pad_probe_info_get_event (info); GstEvent *event = gst_pad_probe_info_get_event (info);
GST_LOG_OBJECT (pad, "Event %" GST_PTR_FORMAT, event); GST_LOG_OBJECT (pad, "Event %" GST_PTR_FORMAT, event);
...@@ -1800,7 +1802,8 @@ gst_splitmux_sink_request_new_pad (GstElement * element, ...@@ -1800,7 +1802,8 @@ gst_splitmux_sink_request_new_pad (GstElement * element,
mq_stream_ctx_ref (ctx); mq_stream_ctx_ref (ctx);
ctx->src_pad_block_id = ctx->src_pad_block_id =
gst_pad_add_probe (q_src, GST_PAD_PROBE_TYPE_DATA_DOWNSTREAM, gst_pad_add_probe (q_src,
GST_PAD_PROBE_TYPE_DATA_DOWNSTREAM | GST_PAD_PROBE_TYPE_EVENT_FLUSH,
(GstPadProbeCallback) handle_mq_output, ctx, (GDestroyNotify) (GstPadProbeCallback) handle_mq_output, ctx, (GDestroyNotify)
_pad_block_destroy_src_notify); _pad_block_destroy_src_notify);
if (is_video && splitmux->reference_ctx != NULL) { if (is_video && splitmux->reference_ctx != NULL) {
...@@ -1817,7 +1820,8 @@ gst_splitmux_sink_request_new_pad (GstElement * element, ...@@ -1817,7 +1820,8 @@ gst_splitmux_sink_request_new_pad (GstElement * element,
mq_stream_ctx_ref (ctx); mq_stream_ctx_ref (ctx);
ctx->sink_pad_block_id = ctx->sink_pad_block_id =
gst_pad_add_probe (q_sink, GST_PAD_PROBE_TYPE_DATA_DOWNSTREAM, gst_pad_add_probe (q_sink,
GST_PAD_PROBE_TYPE_DATA_DOWNSTREAM | GST_PAD_PROBE_TYPE_EVENT_FLUSH,
(GstPadProbeCallback) handle_mq_input, ctx, (GDestroyNotify) (GstPadProbeCallback) handle_mq_input, ctx, (GDestroyNotify)
_pad_block_destroy_sink_notify); _pad_block_destroy_sink_notify);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment