diff options
author | Jan Schmidt <jan@centricular.com> | 2016-04-06 21:03:19 +1000 |
---|---|---|
committer | Jan Schmidt <jan@centricular.com> | 2016-04-06 21:03:19 +1000 |
commit | 2dd399356f9e7f4ca30fab8dd65886fc1120d4b7 (patch) | |
tree | 9a905b7c6dcf80ab7c627dc95ac8fab0abd282a0 /gst | |
parent | c27df799bf515c2aa4ae1b936640f9f90da7fdc1 (diff) |
subtitleoverlay: Don't complain when stream-start is the first event.
When blocking the subtitle pad, it's expected that stream-start
is the first event, and that it can precede caps arriving on the
peer pad - in fact the caps can only have arrived on the peer
pad when it was pre-primed with sticky events previously.
Instead, just pass the stream-start and don't block, because
stream-start is sticky anyway.
Diffstat (limited to 'gst')
-rw-r--r-- | gst/playback/gstsubtitleoverlay.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/gst/playback/gstsubtitleoverlay.c b/gst/playback/gstsubtitleoverlay.c index 5223c8712..d3e02873e 100644 --- a/gst/playback/gstsubtitleoverlay.c +++ b/gst/playback/gstsubtitleoverlay.c @@ -1018,10 +1018,17 @@ _pad_blocked_cb (GstPad * pad, GstPadProbeInfo * info, gpointer user_data) GstCaps *subcaps; GList *l, *factories = NULL; - if (GST_IS_EVENT (info->data) && !GST_EVENT_IS_SERIALIZED (info->data)) { - GST_DEBUG_OBJECT (pad, "Letting non-serialized event %s pass", - GST_EVENT_TYPE_NAME (info->data)); - return GST_PAD_PROBE_PASS; + if (GST_IS_EVENT (info->data)) { + if (!GST_EVENT_IS_SERIALIZED (info->data)) { + GST_DEBUG_OBJECT (pad, "Letting non-serialized event %s pass", + GST_EVENT_TYPE_NAME (info->data)); + return GST_PAD_PROBE_PASS; + } + if (GST_EVENT_TYPE (info->data) == GST_EVENT_STREAM_START) { + GST_DEBUG_OBJECT (pad, "Letting event %s pass", + GST_EVENT_TYPE_NAME (info->data)); + return GST_PAD_PROBE_PASS; + } } GST_DEBUG_OBJECT (pad, "Pad blocked"); @@ -1059,7 +1066,7 @@ _pad_blocked_cb (GstPad * pad, GstPadProbeInfo * info, gpointer user_data) /* If there are no subcaps but the subtitle sink is blocked upstream * must behave wrong as there are no fixed caps set for the first - * buffer or in-order event */ + * buffer or in-order event after stream-start */ if (G_UNLIKELY (!subcaps && self->subtitle_sink_blocked)) { GST_ELEMENT_WARNING (self, CORE, NEGOTIATION, (NULL), ("Subtitle sink is blocked but we have no subtitle caps")); |