diff options
-rw-r--r-- | gst/playback/gstdecodebin3-parse.c | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/gst/playback/gstdecodebin3-parse.c b/gst/playback/gstdecodebin3-parse.c index 85e1de483..354ddb87c 100644 --- a/gst/playback/gstdecodebin3-parse.c +++ b/gst/playback/gstdecodebin3-parse.c @@ -423,20 +423,12 @@ remove_input_stream (GstDecodebin3 * dbin, DecodebinInputStream * stream) g_free (stream); } - -/* FIXME : HACK, REMOVE, USE INPUT CHAINS */ -static GstPadProbeReturn -parsebin_buffer_probe (GstPad * pad, GstPadProbeInfo * info, - DecodebinInput * input) +static void +unblock_pending_input (DecodebinInput * input) { GstDecodebin3 *dbin = input->dbin; GList *tmp, *unused_slot = NULL; - GST_DEBUG_OBJECT (pad, "Got a buffer ! UNBLOCK !"); - - /* Any data out the demuxer means it's not creating pads - * any more right now */ - /* 1. Re-use existing streams if/when possible */ GST_FIXME_OBJECT (dbin, "Re-use existing input streams if/when possible"); @@ -525,6 +517,18 @@ parsebin_buffer_probe (GstPad * pad, GstPadProbeInfo * info, if (unused_slot) g_list_free_full (unused_slot, (GDestroyNotify) gst_object_unref); +} + +/* FIXME : HACK, REMOVE, USE INPUT CHAINS */ +static GstPadProbeReturn +parsebin_buffer_probe (GstPad * pad, GstPadProbeInfo * info, + DecodebinInput * input) +{ + /* Any data out the demuxer means it's not creating pads + * any more right now */ + GST_DEBUG_OBJECT (pad, "Got a buffer ! UNBLOCK !"); + unblock_pending_input (input); + return GST_PAD_PROBE_OK; } @@ -553,6 +557,11 @@ parsebin_pending_event_probe (GstPad * pad, GstPadProbeInfo * info, SELECTION_UNLOCK (dbin); } break; + case GST_EVENT_GAP: + GST_DEBUG_OBJECT (pad, "Got a gap event! UNBLOCK !"); + unblock_pending_input (ppad->input); + ret = GST_PAD_PROBE_OK; + break; default: break; } |