mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-02 14:36:41 +00:00
gst/tcp/gsttcpclientsrc.c (gst_tcpclientsrc_get): Make sure that the pad is negotiated.
Original commit message from CVS: * gst/tcp/gsttcpclientsrc.c (gst_tcpclientsrc_get): Make sure that the pad is negotiated. * gst/ffmpegcolorspace/gstffmpegcolorspace.c (gst_ffmpegcolorspace_chain): Ditto
This commit is contained in:
parent
6fdc736b0a
commit
6c1bc99dee
3 changed files with 25 additions and 0 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2004-07-26 Johan Dahlin <johan@gnome.org>
|
||||||
|
|
||||||
|
* gst/tcp/gsttcpclientsrc.c (gst_tcpclientsrc_get): Make sure that
|
||||||
|
the pad is negotiated.
|
||||||
|
|
||||||
|
* gst/ffmpegcolorspace/gstffmpegcolorspace.c (gst_ffmpegcolorspace_chain): Ditto
|
||||||
|
|
||||||
2004-07-26 Steve Lhomme <steve.lhomme@free.fr>
|
2004-07-26 Steve Lhomme <steve.lhomme@free.fr>
|
||||||
|
|
||||||
* gst-libs/gst/colorbalance/colorbalance.vcproj:
|
* gst-libs/gst/colorbalance/colorbalance.vcproj:
|
||||||
|
|
|
@ -192,6 +192,7 @@ gst_ffmpegcolorspace_pad_link (GstPad * pad, const GstCaps * caps)
|
||||||
return GST_PAD_LINK_REFUSED;
|
return GST_PAD_LINK_REFUSED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* set the size on the otherpad */
|
/* set the size on the otherpad */
|
||||||
othercaps = gst_pad_get_negotiated_caps (otherpad);
|
othercaps = gst_pad_get_negotiated_caps (otherpad);
|
||||||
if (othercaps) {
|
if (othercaps) {
|
||||||
|
@ -309,6 +310,14 @@ gst_ffmpegcolorspace_chain (GstPad * pad, GstData * data)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!gst_pad_is_negotiated (space->srcpad)) {
|
||||||
|
if (GST_PAD_LINK_FAILED (gst_pad_renegotiate (space->srcpad))) {
|
||||||
|
GST_ELEMENT_ERROR (space, CORE, NEGOTIATION, (NULL), GST_ERROR_SYSTEM);
|
||||||
|
gst_buffer_unref (inbuf);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (space->from_pixfmt == PIX_FMT_NB || space->to_pixfmt == PIX_FMT_NB) {
|
if (space->from_pixfmt == PIX_FMT_NB || space->to_pixfmt == PIX_FMT_NB) {
|
||||||
GST_ELEMENT_ERROR (space, CORE, NOT_IMPLEMENTED, (NULL),
|
GST_ELEMENT_ERROR (space, CORE, NOT_IMPLEMENTED, (NULL),
|
||||||
("attempting to convert colorspaces between unknown formats"));
|
("attempting to convert colorspaces between unknown formats"));
|
||||||
|
|
|
@ -218,6 +218,15 @@ gst_tcpclientsrc_get (GstPad * pad)
|
||||||
src = GST_TCPCLIENTSRC (GST_OBJECT_PARENT (pad));
|
src = GST_TCPCLIENTSRC (GST_OBJECT_PARENT (pad));
|
||||||
g_return_val_if_fail (GST_FLAG_IS_SET (src, GST_TCPCLIENTSRC_OPEN), NULL);
|
g_return_val_if_fail (GST_FLAG_IS_SET (src, GST_TCPCLIENTSRC_OPEN), NULL);
|
||||||
|
|
||||||
|
/* try to negotiate here */
|
||||||
|
if (!gst_pad_is_negotiated (pad)) {
|
||||||
|
if (GST_PAD_LINK_FAILED (gst_pad_renegotiate (pad))) {
|
||||||
|
GST_ELEMENT_ERROR (src, CORE, NEGOTIATION, (NULL), GST_ERROR_SYSTEM);
|
||||||
|
gst_buffer_unref (buf);
|
||||||
|
return GST_DATA (gst_event_new (GST_EVENT_EOS));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* if we have a left over buffer after a discont, return that */
|
/* if we have a left over buffer after a discont, return that */
|
||||||
if (src->buffer_after_discont) {
|
if (src->buffer_after_discont) {
|
||||||
buf = src->buffer_after_discont;
|
buf = src->buffer_after_discont;
|
||||||
|
|
Loading…
Reference in a new issue