mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
playbin2: Set sinks to READY before checking if it accept caps
Fixes bug #642732.
This commit is contained in:
parent
a0ff13217a
commit
b76efc7f5d
1 changed files with 18 additions and 0 deletions
|
@ -2967,6 +2967,12 @@ autoplug_continue_cb (GstElement * element, GstPad * pad, GstCaps * caps,
|
||||||
if (sinkpad) {
|
if (sinkpad) {
|
||||||
GstCaps *sinkcaps;
|
GstCaps *sinkcaps;
|
||||||
|
|
||||||
|
/* Ignore errors here, if a custom sink fails to go
|
||||||
|
* to READY things are wrong and will error out later
|
||||||
|
*/
|
||||||
|
if (GST_STATE (sink) < GST_STATE_READY)
|
||||||
|
gst_element_set_state (sink, GST_STATE_READY);
|
||||||
|
|
||||||
sinkcaps = gst_pad_get_caps_reffed (sinkpad);
|
sinkcaps = gst_pad_get_caps_reffed (sinkpad);
|
||||||
if (!gst_caps_is_any (sinkcaps))
|
if (!gst_caps_is_any (sinkcaps))
|
||||||
ret = !gst_pad_accept_caps (sinkpad, caps);
|
ret = !gst_pad_accept_caps (sinkpad, caps);
|
||||||
|
@ -2993,6 +2999,12 @@ autoplug_continue_cb (GstElement * element, GstPad * pad, GstCaps * caps,
|
||||||
if (sinkpad) {
|
if (sinkpad) {
|
||||||
GstCaps *sinkcaps;
|
GstCaps *sinkcaps;
|
||||||
|
|
||||||
|
/* Ignore errors here, if a custom sink fails to go
|
||||||
|
* to READY things are wrong and will error out later
|
||||||
|
*/
|
||||||
|
if (GST_STATE (sink) < GST_STATE_READY)
|
||||||
|
gst_element_set_state (sink, GST_STATE_READY);
|
||||||
|
|
||||||
sinkcaps = gst_pad_get_caps_reffed (sinkpad);
|
sinkcaps = gst_pad_get_caps_reffed (sinkpad);
|
||||||
if (!gst_caps_is_any (sinkcaps))
|
if (!gst_caps_is_any (sinkcaps))
|
||||||
ret = !gst_pad_accept_caps (sinkpad, caps);
|
ret = !gst_pad_accept_caps (sinkpad, caps);
|
||||||
|
@ -3008,6 +3020,12 @@ autoplug_continue_cb (GstElement * element, GstPad * pad, GstCaps * caps,
|
||||||
if (sinkpad) {
|
if (sinkpad) {
|
||||||
GstCaps *sinkcaps;
|
GstCaps *sinkcaps;
|
||||||
|
|
||||||
|
/* Ignore errors here, if a custom sink fails to go
|
||||||
|
* to READY things are wrong and will error out later
|
||||||
|
*/
|
||||||
|
if (GST_STATE (sink) < GST_STATE_READY)
|
||||||
|
gst_element_set_state (sink, GST_STATE_READY);
|
||||||
|
|
||||||
sinkcaps = gst_pad_get_caps_reffed (sinkpad);
|
sinkcaps = gst_pad_get_caps_reffed (sinkpad);
|
||||||
if (!gst_caps_is_any (sinkcaps))
|
if (!gst_caps_is_any (sinkcaps))
|
||||||
ret = !gst_pad_accept_caps (sinkpad, caps);
|
ret = !gst_pad_accept_caps (sinkpad, caps);
|
||||||
|
|
Loading…
Reference in a new issue