mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
rtp: Initialize GstRTPBuffer before usage
This commit is contained in:
parent
1538803ac4
commit
04520cbe9a
25 changed files with 29 additions and 29 deletions
|
@ -147,7 +147,7 @@ gst_asteriskh263_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
|
|||
guint32 timestamp;
|
||||
guint32 samples;
|
||||
guint16 asterisk_len;
|
||||
GstRTPBuffer rtp;
|
||||
GstRTPBuffer rtp = { NULL };
|
||||
guint8 *data;
|
||||
|
||||
gst_rtp_buffer_map (buf, GST_MAP_READ, &rtp);
|
||||
|
|
|
@ -217,7 +217,7 @@ gst_rtp_L16_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
|
|||
GstBuffer *outbuf;
|
||||
gint payload_len;
|
||||
gboolean marker;
|
||||
GstRTPBuffer rtp;
|
||||
GstRTPBuffer rtp = { NULL };
|
||||
|
||||
rtpL16depay = GST_RTP_L16_DEPAY (depayload);
|
||||
|
||||
|
|
|
@ -488,7 +488,7 @@ gst_rtp_jpeg_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
|
|||
guint type, width, height;
|
||||
guint16 dri, precision, length;
|
||||
guint8 *qtable;
|
||||
GstRTPBuffer rtp;
|
||||
GstRTPBuffer rtp = { NULL };
|
||||
|
||||
rtpjpegdepay = GST_RTP_JPEG_DEPAY (depayload);
|
||||
|
||||
|
|
|
@ -745,7 +745,7 @@ gst_rtp_jpeg_pay_handle_buffer (GstRTPBasePayload * basepayload,
|
|||
guint payload_size = (bytes_left < mtu ? bytes_left : mtu);
|
||||
guint header_size;
|
||||
GstBuffer *paybuf;
|
||||
GstRTPBuffer rtp;
|
||||
GstRTPBuffer rtp = { NULL };
|
||||
|
||||
header_size = sizeof (jpeg_header) + quant_data_size;
|
||||
if (dri_found)
|
||||
|
|
|
@ -123,7 +123,7 @@ static GstBuffer *
|
|||
gst_rtp_mp1s_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
|
||||
{
|
||||
GstBuffer *outbuf;
|
||||
GstRTPBuffer rtp;
|
||||
GstRTPBuffer rtp = { NULL };
|
||||
|
||||
gst_rtp_buffer_map (buf, GST_MAP_READ, &rtp);
|
||||
outbuf = gst_rtp_buffer_get_payload_buffer (&rtp);
|
||||
|
|
|
@ -151,7 +151,7 @@ gst_rtp_mp2t_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
|
|||
GstRtpMP2TDepay *rtpmp2tdepay;
|
||||
GstBuffer *outbuf;
|
||||
gint payload_len;
|
||||
GstRTPBuffer rtp;
|
||||
GstRTPBuffer rtp = { NULL };
|
||||
|
||||
rtpmp2tdepay = GST_RTP_MP2T_DEPAY (depayload);
|
||||
|
||||
|
|
|
@ -121,7 +121,7 @@ gst_rtp_mp2t_pay_flush (GstRTPMP2TPay * rtpmp2tpay)
|
|||
guint8 *payload;
|
||||
GstFlowReturn ret;
|
||||
GstBuffer *outbuf;
|
||||
GstRTPBuffer rtp;
|
||||
GstRTPBuffer rtp = { NULL };
|
||||
|
||||
avail = gst_adapter_available (rtpmp2tpay->adapter);
|
||||
outbuf = gst_rtp_buffer_new_allocate (avail, 0, 0);
|
||||
|
|
|
@ -292,7 +292,7 @@ gst_rtp_mp4a_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
|
|||
{
|
||||
GstRtpMP4ADepay *rtpmp4adepay;
|
||||
GstBuffer *outbuf;
|
||||
GstRTPBuffer rtp;
|
||||
GstRTPBuffer rtp = { NULL };
|
||||
guint8 *bdata;
|
||||
|
||||
rtpmp4adepay = GST_RTP_MP4A_DEPAY (depayload);
|
||||
|
|
|
@ -368,7 +368,7 @@ gst_rtp_mp4a_pay_handle_buffer (GstRTPBasePayload * basepayload,
|
|||
guint8 *payload;
|
||||
guint payload_len;
|
||||
guint packet_len;
|
||||
GstRTPBuffer rtp;
|
||||
GstRTPBuffer rtp = { NULL };
|
||||
|
||||
/* this will be the total lenght of the packet */
|
||||
packet_len = gst_rtp_buffer_calc_packet_len (size, 0, 0);
|
||||
|
|
|
@ -424,7 +424,7 @@ gst_rtp_mp4g_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
|
|||
GstRtpMP4GDepay *rtpmp4gdepay;
|
||||
GstBuffer *outbuf = NULL;
|
||||
GstClockTime timestamp;
|
||||
GstRTPBuffer rtp;
|
||||
GstRTPBuffer rtp = { NULL };
|
||||
|
||||
rtpmp4gdepay = GST_RTP_MP4G_DEPAY (depayload);
|
||||
|
||||
|
|
|
@ -470,7 +470,7 @@ gst_rtp_mp4g_pay_flush (GstRtpMP4GPay * rtpmp4gpay)
|
|||
guint8 *payload;
|
||||
guint payload_len;
|
||||
guint packet_len;
|
||||
GstRTPBuffer rtp;
|
||||
GstRTPBuffer rtp = { NULL };
|
||||
|
||||
/* this will be the total lenght of the packet */
|
||||
packet_len = gst_rtp_buffer_calc_packet_len (avail, 0, 0);
|
||||
|
|
|
@ -164,7 +164,7 @@ gst_rtp_mp4v_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
|
|||
{
|
||||
GstRtpMP4VDepay *rtpmp4vdepay;
|
||||
GstBuffer *outbuf = NULL;
|
||||
GstRTPBuffer rtp;
|
||||
GstRTPBuffer rtp = { NULL };
|
||||
|
||||
rtpmp4vdepay = GST_RTP_MP4V_DEPAY (depayload);
|
||||
|
||||
|
|
|
@ -278,7 +278,7 @@ gst_rtp_mp4v_pay_flush (GstRtpMP4VPay * rtpmp4vpay)
|
|||
guint towrite;
|
||||
guint payload_len;
|
||||
guint packet_len;
|
||||
GstRTPBuffer rtp;
|
||||
GstRTPBuffer rtp = { NULL };
|
||||
|
||||
/* this will be the total lenght of the packet */
|
||||
packet_len = gst_rtp_buffer_calc_packet_len (avail, 0, 0);
|
||||
|
|
|
@ -260,7 +260,7 @@ gst_rtp_qcelp_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
|
|||
guint payload_len, offset, index;
|
||||
guint8 *payload;
|
||||
guint LLL, NNN;
|
||||
GstRTPBuffer rtp;
|
||||
GstRTPBuffer rtp = { NULL };
|
||||
|
||||
depay = GST_RTP_QCELP_DEPAY (depayload);
|
||||
|
||||
|
|
|
@ -232,7 +232,7 @@ gst_rtp_qdm2_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
|
|||
GstRtpQDM2Depay *rtpqdm2depay;
|
||||
GstBuffer *outbuf = NULL;
|
||||
guint16 seq;
|
||||
GstRTPBuffer rtp;
|
||||
GstRTPBuffer rtp = { NULL };
|
||||
|
||||
rtpqdm2depay = GST_RTP_QDM2_DEPAY (depayload);
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@ static GstBuffer *
|
|||
gst_rtp_siren_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
|
||||
{
|
||||
GstBuffer *outbuf;
|
||||
GstRTPBuffer rtp;
|
||||
GstRTPBuffer rtp = { NULL };
|
||||
|
||||
gst_rtp_buffer_map (buf, GST_MAP_READ, &rtp);
|
||||
outbuf = gst_rtp_buffer_get_payload_buffer (&rtp);
|
||||
|
|
|
@ -198,7 +198,7 @@ static GstBuffer *
|
|||
gst_rtp_speex_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
|
||||
{
|
||||
GstBuffer *outbuf = NULL;
|
||||
GstRTPBuffer rtp;
|
||||
GstRTPBuffer rtp = { NULL };
|
||||
|
||||
gst_rtp_buffer_map (buf, GST_MAP_READ, &rtp);
|
||||
|
||||
|
|
|
@ -238,7 +238,7 @@ gst_rtp_speex_pay_handle_buffer (GstRTPBasePayload * basepayload,
|
|||
guint8 *payload, *data;
|
||||
GstClockTime timestamp, duration;
|
||||
GstFlowReturn ret;
|
||||
GstRTPBuffer rtp;
|
||||
GstRTPBuffer rtp = { NULL };
|
||||
|
||||
rtpspeexpay = GST_RTP_SPEEX_PAY (basepayload);
|
||||
|
||||
|
|
|
@ -148,7 +148,7 @@ gst_rtp_sv3v_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
|
|||
gboolean C, S, E;
|
||||
GstBuffer *outbuf = NULL;
|
||||
guint16 seq;
|
||||
GstRTPBuffer rtp;
|
||||
GstRTPBuffer rtp = { NULL };
|
||||
|
||||
rtpsv3vdepay = GST_RTP_SV3V_DEPAY (depayload);
|
||||
|
||||
|
|
|
@ -407,7 +407,7 @@ gst_rtp_theora_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
|
|||
guint8 *payload, *to_free = NULL;
|
||||
guint32 header, ident;
|
||||
guint8 F, TDT, packets;
|
||||
GstRTPBuffer rtp;
|
||||
GstRTPBuffer rtp = { NULL };
|
||||
|
||||
rtptheoradepay = GST_RTP_THEORA_DEPAY (depayload);
|
||||
|
||||
|
|
|
@ -180,7 +180,7 @@ static void
|
|||
gst_rtp_theora_pay_reset_packet (GstRtpTheoraPay * rtptheorapay, guint8 TDT)
|
||||
{
|
||||
guint payload_len;
|
||||
GstRTPBuffer rtp;
|
||||
GstRTPBuffer rtp = { NULL };
|
||||
|
||||
GST_DEBUG_OBJECT (rtptheorapay, "reset packet");
|
||||
|
||||
|
@ -219,7 +219,7 @@ gst_rtp_theora_pay_flush_packet (GstRtpTheoraPay * rtptheorapay)
|
|||
GstFlowReturn ret;
|
||||
guint8 *payload;
|
||||
guint hlen;
|
||||
GstRTPBuffer rtp;
|
||||
GstRTPBuffer rtp = { NULL };
|
||||
|
||||
/* check for empty packet */
|
||||
if (!rtptheorapay->packet || rtptheorapay->payload_pos <= 4)
|
||||
|
@ -539,7 +539,7 @@ gst_rtp_theora_pay_payload_buffer (GstRtpTheoraPay * rtptheorapay, guint8 TDT,
|
|||
guint plen;
|
||||
guint8 *ppos, *payload;
|
||||
gboolean fragmented;
|
||||
GstRTPBuffer rtp;
|
||||
GstRTPBuffer rtp = { NULL };
|
||||
|
||||
/* size increases with packet length and 2 bytes size eader. */
|
||||
newduration = rtptheorapay->payload_duration;
|
||||
|
|
|
@ -443,7 +443,7 @@ gst_rtp_vorbis_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
|
|||
guint8 *payload, *to_free = NULL;
|
||||
guint32 header, ident;
|
||||
guint8 F, VDT, packets;
|
||||
GstRTPBuffer rtp;
|
||||
GstRTPBuffer rtp = { NULL };
|
||||
|
||||
rtpvorbisdepay = GST_RTP_VORBIS_DEPAY (depayload);
|
||||
|
||||
|
|
|
@ -140,7 +140,7 @@ static void
|
|||
gst_rtp_vorbis_pay_reset_packet (GstRtpVorbisPay * rtpvorbispay, guint8 VDT)
|
||||
{
|
||||
guint payload_len;
|
||||
GstRTPBuffer rtp;
|
||||
GstRTPBuffer rtp = { NULL };
|
||||
|
||||
GST_LOG_OBJECT (rtpvorbispay, "reset packet");
|
||||
|
||||
|
@ -178,7 +178,7 @@ gst_rtp_vorbis_pay_flush_packet (GstRtpVorbisPay * rtpvorbispay)
|
|||
GstFlowReturn ret;
|
||||
guint8 *payload;
|
||||
guint hlen;
|
||||
GstRTPBuffer rtp;
|
||||
GstRTPBuffer rtp = { NULL };
|
||||
|
||||
/* check for empty packet */
|
||||
if (!rtpvorbispay->packet || rtpvorbispay->payload_pos <= 4)
|
||||
|
@ -484,7 +484,7 @@ gst_rtp_vorbis_pay_handle_buffer (GstRTPBasePayload * basepayload,
|
|||
guint plen;
|
||||
guint8 *ppos, *payload;
|
||||
gboolean fragmented;
|
||||
GstRTPBuffer rtp;
|
||||
GstRTPBuffer rtp = { NULL };
|
||||
|
||||
rtpvorbispay = GST_RTP_VORBIS_PAY (basepayload);
|
||||
|
||||
|
|
|
@ -296,7 +296,7 @@ gst_rtp_vraw_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
|
|||
guint32 timestamp;
|
||||
guint cont, ystride, uvstride, pgroup, payload_len;
|
||||
gint width, height, xinc, yinc;
|
||||
GstRTPBuffer rtp;
|
||||
GstRTPBuffer rtp = { NULL };
|
||||
GstVideoFrame frame;
|
||||
|
||||
rtpvrawdepay = GST_RTP_VRAW_DEPAY (depayload);
|
||||
|
|
|
@ -247,7 +247,7 @@ gst_rtp_vraw_pay_handle_buffer (GstRTPBasePayload * payload, GstBuffer * buffer)
|
|||
gint field;
|
||||
GstVideoFrame frame;
|
||||
gint interlaced;
|
||||
GstRTPBuffer rtp;
|
||||
GstRTPBuffer rtp = { NULL, };
|
||||
|
||||
rtpvrawpay = GST_RTP_VRAW_PAY (payload);
|
||||
|
||||
|
|
Loading…
Reference in a new issue