diff options
author | Wim Taymans <wim.taymans@gmail.com> | 2008-09-02 11:23:02 +0000 |
---|---|---|
committer | Wim Taymans <wim.taymans@gmail.com> | 2008-09-02 11:23:02 +0000 |
commit | 0ce15bab49aca60f380e186c47bcb0ebe4999367 (patch) | |
tree | f6ff017cd51eef134740755685ca35be92583b11 /gst/mpegtsmux | |
parent | b7276b6f7c7c304bde4f3de30f09af200b4b1275 (diff) | |
download | gstreamer-plugins-bad-0ce15bab49aca60f380e186c47bcb0ebe4999367.tar.gz |
gst/mpegtsmux/mpegtsmux.c: Set caps on outgoing buffers.
Original commit message from CVS:
* gst/mpegtsmux/mpegtsmux.c: (new_packet_cb):
Set caps on outgoing buffers.
Diffstat (limited to 'gst/mpegtsmux')
-rw-r--r-- | gst/mpegtsmux/mpegtsmux.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gst/mpegtsmux/mpegtsmux.c b/gst/mpegtsmux/mpegtsmux.c index 9e5843e80..2b418f354 100644 --- a/gst/mpegtsmux/mpegtsmux.c +++ b/gst/mpegtsmux/mpegtsmux.c @@ -668,6 +668,8 @@ new_packet_cb (guint8 * data, guint len, void *user_data, gint64 new_pcr) mux->last_flow_ret = GST_FLOW_ERROR; return FALSE; } + gst_buffer_set_caps (buf, GST_PAD_CAPS (mux->srcpad)); + /* copies the ts data of 188 bytes to the m2ts buffer at an offset of 4 bytes of timestamp */ memcpy (GST_BUFFER_DATA (buf) + 4, data, len); @@ -710,6 +712,7 @@ new_packet_cb (guint8 * data, guint len, void *user_data, gint64 new_pcr) out_buf = gst_adapter_take_buffer (mux->adapter, M2TS_PACKET_LENGTH); if (G_UNLIKELY (!out_buf)) break; + gst_buffer_set_caps (out_buf, GST_PAD_CAPS (mux->srcpad)); /*writing the 4 byte timestamp value */ GST_WRITE_UINT32_BE (GST_BUFFER_DATA (out_buf), m2ts_pcr); @@ -737,6 +740,7 @@ new_packet_cb (guint8 * data, guint len, void *user_data, gint64 new_pcr) mux->last_flow_ret = GST_FLOW_ERROR; return FALSE; } + gst_buffer_set_caps (buf, GST_PAD_CAPS (mux->srcpad)); memcpy (GST_BUFFER_DATA (buf), data, len); GST_BUFFER_TIMESTAMP (buf) = mux->last_ts; |