summaryrefslogtreecommitdiff
path: root/ext/bz2
diff options
context:
space:
mode:
authorEdward Hervey <edward@collabora.com>2014-04-08 09:51:08 +0200
committerEdward Hervey <edward@collabora.com>2014-04-08 09:55:15 +0200
commit334bcd433bba0235de98e2980b54ed476271fbfc (patch)
tree98899a10b124be7ffe088d67aaf2a4a6df8ad610 /ext/bz2
parent1f0a67f295e18f52e7ec51bfb235ab7a5d1d61dc (diff)
downloadgstreamer-plugins-bad-334bcd433bba0235de98e2980b54ed476271fbfc.tar.gz
bz2: Initialize variables
There is a small chance that we might end up in the done step without having any output available. Furthermore, when going through not_ready, we need to ensure gst_buffer_unmap has a properly initialized GstMapInfo. CID #1139923 CID #1139924 CID #1139919 CID #1139920
Diffstat (limited to 'ext/bz2')
-rw-r--r--ext/bz2/gstbz2dec.c4
-rw-r--r--ext/bz2/gstbz2enc.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/ext/bz2/gstbz2dec.c b/ext/bz2/gstbz2dec.c
index 2d873b83c..5a06b1920 100644
--- a/ext/bz2/gstbz2dec.c
+++ b/ext/bz2/gstbz2dec.c
@@ -104,11 +104,11 @@ gst_bz2dec_decompress_init (GstBz2dec * b)
static GstFlowReturn
gst_bz2dec_chain (GstPad * pad, GstObject * parent, GstBuffer * in)
{
- GstFlowReturn flow;
+ GstFlowReturn flow = GST_FLOW_OK;
GstBuffer *out;
GstBz2dec *b;
int r = BZ_OK;
- GstMapInfo map, omap;
+ GstMapInfo map = GST_MAP_INFO_INIT, omap;
b = GST_BZ2DEC (parent);
diff --git a/ext/bz2/gstbz2enc.c b/ext/bz2/gstbz2enc.c
index 5ff872c98..c1c1ee1fc 100644
--- a/ext/bz2/gstbz2enc.c
+++ b/ext/bz2/gstbz2enc.c
@@ -108,7 +108,7 @@ gst_bz2enc_event (GstPad * pad, GstObject * parent, GstEvent * e)
b = GST_BZ2ENC (parent);
switch (GST_EVENT_TYPE (e)) {
case GST_EVENT_EOS:{
- GstFlowReturn flow;
+ GstFlowReturn flow = GST_FLOW_OK;
int r = BZ_FINISH_OK;
do {
@@ -173,7 +173,7 @@ gst_bz2enc_chain (GstPad * pad, GstObject * parent, GstBuffer * in)
GstBz2enc *b;
guint n;
int bz2_ret;
- GstMapInfo map, omap;
+ GstMapInfo map = GST_MAP_INFO_INIT, omap;
b = GST_BZ2ENC (parent);