Commit 8883421b authored by Sebastian Dröge's avatar Sebastian Dröge
Browse files

wavpackdec: Initialize uninitialized variable and don't unref it if it's NULL

parent e49d8a28
...@@ -251,7 +251,7 @@ static GstFlowReturn ...@@ -251,7 +251,7 @@ static GstFlowReturn
gst_wavpack_dec_chain (GstPad * pad, GstBuffer * buf) gst_wavpack_dec_chain (GstPad * pad, GstBuffer * buf)
{ {
GstWavpackDec *dec; GstWavpackDec *dec;
GstBuffer *outbuf; GstBuffer *outbuf = NULL;
GstFlowReturn ret = GST_FLOW_OK; GstFlowReturn ret = GST_FLOW_OK;
WavpackHeader wph; WavpackHeader wph;
int32_t decoded, unpacked_size; int32_t decoded, unpacked_size;
...@@ -422,6 +422,7 @@ decode_error: ...@@ -422,6 +422,7 @@ decode_error:
} }
GST_ELEMENT_ERROR (dec, STREAM, DECODE, (NULL), GST_ELEMENT_ERROR (dec, STREAM, DECODE, (NULL),
("Failed to decode wavpack stream: %s", reason)); ("Failed to decode wavpack stream: %s", reason));
if (outbuf)
gst_buffer_unref (outbuf); gst_buffer_unref (outbuf);
gst_buffer_unref (buf); gst_buffer_unref (buf);
return GST_FLOW_ERROR; return GST_FLOW_ERROR;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment