gst/gdp/gstgdppay.c: Make sure we set the IN_CAPS flag correctly.

Original commit message from CVS:
* gst/gdp/gstgdppay.c: (gst_gdp_pay_chain),
(gst_gdp_pay_sink_event):
Make sure we set the IN_CAPS flag correctly.
* gst/tcp/gstmultifdsink.c: (gst_multi_fd_sink_render):
Get the IN_CAPS flag before we call functions that mess with the flags.
This commit is contained in:
Wim Taymans 2007-04-12 10:03:22 +00:00 committed by Tim-Philipp Müller
parent c1c0767689
commit 1ed9b0fff4

View file

@ -563,6 +563,7 @@ gst_gdp_pay_chain (GstPad * pad, GstBuffer * buffer)
} else { } else {
GST_BUFFER_TIMESTAMP (outbuffer) = GST_BUFFER_TIMESTAMP (buffer); GST_BUFFER_TIMESTAMP (outbuffer) = GST_BUFFER_TIMESTAMP (buffer);
GST_BUFFER_DURATION (outbuffer) = 0; GST_BUFFER_DURATION (outbuffer) = 0;
GST_BUFFER_FLAG_SET (outbuffer, GST_BUFFER_FLAG_IN_CAPS);
GST_DEBUG_OBJECT (this, "Storing buffer %p as new_segment_buf", GST_DEBUG_OBJECT (this, "Storing buffer %p as new_segment_buf",
outbuffer); outbuffer);
this->new_segment_buf = outbuffer; this->new_segment_buf = outbuffer;
@ -661,22 +662,25 @@ gst_gdp_pay_sink_event (GstPad * pad, GstEvent * event)
* and not send it on */ * and not send it on */
switch (GST_EVENT_TYPE (event)) { switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_NEWSEGMENT: case GST_EVENT_NEWSEGMENT:
GST_DEBUG_OBJECT (this, "Storing buffer %p as new_segment_buf", GST_DEBUG_OBJECT (this, "Storing in caps buffer %p as new_segment_buf",
outbuffer); outbuffer);
if (this->new_segment_buf) if (this->new_segment_buf)
gst_buffer_unref (this->new_segment_buf); gst_buffer_unref (this->new_segment_buf);
this->new_segment_buf = outbuffer; this->new_segment_buf = outbuffer;
GST_BUFFER_FLAG_SET (outbuffer, GST_BUFFER_FLAG_IN_CAPS);
gst_gdp_pay_reset_streamheader (this); gst_gdp_pay_reset_streamheader (this);
break; break;
case GST_EVENT_TAG: case GST_EVENT_TAG:
GST_DEBUG_OBJECT (this, "Storing buffer %p as tag_buf", outbuffer); GST_DEBUG_OBJECT (this, "Storing in caps buffer %p as tag_buf",
outbuffer);
if (this->tag_buf) if (this->tag_buf)
gst_buffer_unref (this->tag_buf); gst_buffer_unref (this->tag_buf);
this->tag_buf = outbuffer; this->tag_buf = outbuffer;
GST_BUFFER_FLAG_SET (outbuffer, GST_BUFFER_FLAG_IN_CAPS);
gst_gdp_pay_reset_streamheader (this); gst_gdp_pay_reset_streamheader (this);
break; break;
default: default: