From ea0ed511f81c7fbff4c35323d862ef915b32c6f3 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Mon, 5 Dec 2011 18:42:24 +0100 Subject: [PATCH] rtp: Initialize GstRTPBuffer before usage --- gst-libs/gst/rtp/gstrtpbaseaudiopayload.c | 8 ++++---- gst-libs/gst/rtp/gstrtpbasedepayload.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gst-libs/gst/rtp/gstrtpbaseaudiopayload.c b/gst-libs/gst/rtp/gstrtpbaseaudiopayload.c index 714544814a..1991ca9a2f 100644 --- a/gst-libs/gst/rtp/gstrtpbaseaudiopayload.c +++ b/gst-libs/gst/rtp/gstrtpbaseaudiopayload.c @@ -397,7 +397,7 @@ gst_rtp_base_audio_payload_set_meta (GstRTPBaseAudioPayload * payload, { GstRTPBasePayload *basepayload; GstRTPBaseAudioPayloadPrivate *priv; - GstRTPBuffer rtp; + GstRTPBuffer rtp = { NULL }; basepayload = GST_RTP_BASE_PAYLOAD_CAST (payload); priv = payload->priv; @@ -453,7 +453,7 @@ gst_rtp_base_audio_payload_push (GstRTPBaseAudioPayload * baseaudiopayload, GstBuffer *outbuf; guint8 *payload; GstFlowReturn ret; - GstRTPBuffer rtp; + GstRTPBuffer rtp = { NULL }; basepayload = GST_RTP_BASE_PAYLOAD (baseaudiopayload); @@ -526,7 +526,7 @@ gst_rtp_base_audio_payload_push_buffer (GstRTPBaseAudioPayload * GST_DEBUG_OBJECT (baseaudiopayload, "Pushing list %p", list); ret = gst_rtp_base_payload_push_list (basepayload, list); } else { - GstRTPBuffer rtp; + GstRTPBuffer rtp = { NULL }; /* copy payload */ gst_rtp_buffer_map (outbuf, GST_MAP_WRITE, &rtp); @@ -612,7 +612,7 @@ gst_rtp_base_audio_payload_flush (GstRTPBaseAudioPayload * baseaudiopayload, gst_rtp_base_audio_payload_push_buffer (baseaudiopayload, buffer, timestamp); } else { - GstRTPBuffer rtp; + GstRTPBuffer rtp = { NULL }; /* create buffer to hold the payload */ outbuf = gst_rtp_buffer_new_allocate (payload_len, 0, 0); diff --git a/gst-libs/gst/rtp/gstrtpbasedepayload.c b/gst-libs/gst/rtp/gstrtpbasedepayload.c index 4986718860..e85fd7ab8f 100644 --- a/gst-libs/gst/rtp/gstrtpbasedepayload.c +++ b/gst-libs/gst/rtp/gstrtpbasedepayload.c @@ -248,7 +248,7 @@ gst_rtp_base_depayload_chain (GstPad * pad, GstObject * parent, GstBuffer * in) guint32 rtptime; gboolean discont; gint gap; - GstRTPBuffer rtp; + GstRTPBuffer rtp = { NULL }; filter = GST_RTP_BASE_DEPAYLOAD (parent); priv = filter->priv; -- 2.34.1