mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 07:47:17 +00:00
discoverer: Ensure that we have fixed, non-empty caps before passing passing to is_subtitle_caps()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/655>
This commit is contained in:
parent
350a7197e7
commit
ceb705837d
1 changed files with 4 additions and 2 deletions
|
@ -712,7 +712,8 @@ uridecodebin_pad_added_cb (GstElement * uridecodebin, GstPad * pad,
|
||||||
if (sinkpad == NULL)
|
if (sinkpad == NULL)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
if (is_subtitle_caps (caps)) {
|
if (caps && !gst_caps_is_empty (caps) && !gst_caps_is_any (caps)
|
||||||
|
&& is_subtitle_caps (caps)) {
|
||||||
/* Subtitle streams are sparse and may not provide any information - don't
|
/* Subtitle streams are sparse and may not provide any information - don't
|
||||||
* wait for data to preroll */
|
* wait for data to preroll */
|
||||||
ps->probe_id =
|
ps->probe_id =
|
||||||
|
@ -722,7 +723,8 @@ uridecodebin_pad_added_cb (GstElement * uridecodebin, GstPad * pad,
|
||||||
dc->priv->pending_subtitle_pads++;
|
dc->priv->pending_subtitle_pads++;
|
||||||
}
|
}
|
||||||
|
|
||||||
gst_caps_unref (caps);
|
if (caps)
|
||||||
|
gst_caps_unref (caps);
|
||||||
|
|
||||||
gst_bin_add_many (dc->priv->pipeline, ps->queue, ps->sink, NULL);
|
gst_bin_add_many (dc->priv->pipeline, ps->queue, ps->sink, NULL);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue