rtp: Initialize GstRTPBuffer before usage

This commit is contained in:
Edward Hervey 2011-12-05 18:39:59 +01:00
parent 1538803ac4
commit 04520cbe9a
25 changed files with 29 additions and 29 deletions

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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)

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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;

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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);