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
This commit is contained in:
Edward Hervey 2014-04-08 09:51:08 +02:00
parent 1f0a67f295
commit 334bcd433b
2 changed files with 4 additions and 4 deletions

View file

@ -104,11 +104,11 @@ gst_bz2dec_decompress_init (GstBz2dec * b)
static GstFlowReturn static GstFlowReturn
gst_bz2dec_chain (GstPad * pad, GstObject * parent, GstBuffer * in) gst_bz2dec_chain (GstPad * pad, GstObject * parent, GstBuffer * in)
{ {
GstFlowReturn flow; GstFlowReturn flow = GST_FLOW_OK;
GstBuffer *out; GstBuffer *out;
GstBz2dec *b; GstBz2dec *b;
int r = BZ_OK; int r = BZ_OK;
GstMapInfo map, omap; GstMapInfo map = GST_MAP_INFO_INIT, omap;
b = GST_BZ2DEC (parent); b = GST_BZ2DEC (parent);

View file

@ -108,7 +108,7 @@ gst_bz2enc_event (GstPad * pad, GstObject * parent, GstEvent * e)
b = GST_BZ2ENC (parent); b = GST_BZ2ENC (parent);
switch (GST_EVENT_TYPE (e)) { switch (GST_EVENT_TYPE (e)) {
case GST_EVENT_EOS:{ case GST_EVENT_EOS:{
GstFlowReturn flow; GstFlowReturn flow = GST_FLOW_OK;
int r = BZ_FINISH_OK; int r = BZ_FINISH_OK;
do { do {
@ -173,7 +173,7 @@ gst_bz2enc_chain (GstPad * pad, GstObject * parent, GstBuffer * in)
GstBz2enc *b; GstBz2enc *b;
guint n; guint n;
int bz2_ret; int bz2_ret;
GstMapInfo map, omap; GstMapInfo map = GST_MAP_INFO_INIT, omap;
b = GST_BZ2ENC (parent); b = GST_BZ2ENC (parent);