summaryrefslogtreecommitdiffstats
path: root/gst/y4m
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@collabora.co.uk>2009-05-13 17:54:47 +0200
committerJan Schmidt <thaytan@noraisin.net>2009-05-15 23:35:08 +0100
commit695ce19ef44a1aae5730bf36cf3f6727e915546a (patch)
tree13d734ce0d0e2be2376d7a05c54d637c2bd58112 /gst/y4m
parent248fefbe480c67ad8dfefa5d5c1da4b56361fc85 (diff)
[MOVED FROM BAD] y4menc: don't strip timestamps
Fixes #582483
Diffstat (limited to 'gst/y4m')
-rw-r--r--gst/y4m/gsty4mencode.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gst/y4m/gsty4mencode.c b/gst/y4m/gsty4mencode.c
index dc218643..cc9352ab 100644
--- a/gst/y4m/gsty4mencode.c
+++ b/gst/y4m/gsty4mencode.c
@@ -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);
}