mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 05:28:32 +00:00
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.
This commit is contained in:
parent
b7276b6f7c
commit
0ce15bab49
2 changed files with 9 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2008-09-02 Wim Taymans <wim.taymans@collabora.co.uk>
|
||||||
|
|
||||||
|
* gst/mpegtsmux/mpegtsmux.c: (new_packet_cb):
|
||||||
|
Set caps on outgoing buffers.
|
||||||
|
|
||||||
2008-09-02 Tim-Philipp Müller <tim.muller at collabora co uk>
|
2008-09-02 Tim-Philipp Müller <tim.muller at collabora co uk>
|
||||||
|
|
||||||
* ext/resindvd/plugin.c: (plugin_init):
|
* ext/resindvd/plugin.c: (plugin_init):
|
||||||
|
|
|
@ -668,6 +668,8 @@ new_packet_cb (guint8 * data, guint len, void *user_data, gint64 new_pcr)
|
||||||
mux->last_flow_ret = GST_FLOW_ERROR;
|
mux->last_flow_ret = GST_FLOW_ERROR;
|
||||||
return FALSE;
|
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
|
/* copies the ts data of 188 bytes to the m2ts buffer at an offset
|
||||||
of 4 bytes of timestamp */
|
of 4 bytes of timestamp */
|
||||||
memcpy (GST_BUFFER_DATA (buf) + 4, data, len);
|
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);
|
out_buf = gst_adapter_take_buffer (mux->adapter, M2TS_PACKET_LENGTH);
|
||||||
if (G_UNLIKELY (!out_buf))
|
if (G_UNLIKELY (!out_buf))
|
||||||
break;
|
break;
|
||||||
|
gst_buffer_set_caps (out_buf, GST_PAD_CAPS (mux->srcpad));
|
||||||
|
|
||||||
/*writing the 4 byte timestamp value */
|
/*writing the 4 byte timestamp value */
|
||||||
GST_WRITE_UINT32_BE (GST_BUFFER_DATA (out_buf), m2ts_pcr);
|
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;
|
mux->last_flow_ret = GST_FLOW_ERROR;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
gst_buffer_set_caps (buf, GST_PAD_CAPS (mux->srcpad));
|
||||||
|
|
||||||
memcpy (GST_BUFFER_DATA (buf), data, len);
|
memcpy (GST_BUFFER_DATA (buf), data, len);
|
||||||
GST_BUFFER_TIMESTAMP (buf) = mux->last_ts;
|
GST_BUFFER_TIMESTAMP (buf) = mux->last_ts;
|
||||||
|
|
Loading…
Reference in a new issue