mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-28 11:55:39 +00:00
parent
453794d383
commit
60f46ec99c
1 changed files with 6 additions and 2 deletions
|
@ -231,6 +231,7 @@ gst_y4m_encode_chain (GstPad * pad, GstBuffer * buf)
|
|||
{
|
||||
GstY4mEncode *filter = GST_Y4M_ENCODE (GST_PAD_PARENT (pad));
|
||||
GstBuffer *outbuf;
|
||||
GstClockTime timestamp;
|
||||
|
||||
/* check we got some decent info from caps */
|
||||
if (filter->width < 0) {
|
||||
|
@ -240,6 +241,8 @@ gst_y4m_encode_chain (GstPad * pad, GstBuffer * buf)
|
|||
return GST_FLOW_NOT_NEGOTIATED;
|
||||
}
|
||||
|
||||
timestamp = GST_BUFFER_TIMESTAMP (buf);
|
||||
|
||||
if (G_UNLIKELY (!filter->header)) {
|
||||
outbuf = gst_y4m_encode_get_stream_header (filter);
|
||||
filter->header = TRUE;
|
||||
|
@ -252,8 +255,9 @@ gst_y4m_encode_chain (GstPad * pad, GstBuffer * buf)
|
|||
/* decorate */
|
||||
gst_buffer_make_metadata_writable (outbuf);
|
||||
gst_buffer_set_caps (outbuf, GST_PAD_CAPS (filter->srcpad));
|
||||
/* strip to avoid sink dropping on time-base, decorate and send */
|
||||
GST_BUFFER_TIMESTAMP (outbuf) = GST_CLOCK_TIME_NONE;
|
||||
|
||||
GST_BUFFER_TIMESTAMP (outbuf) = timestamp;
|
||||
|
||||
return gst_pad_push (filter->srcpad, outbuf);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue