diff options
author | Havard Graff <havard.graff@gmail.com> | 2017-06-06 10:39:15 +0200 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2017-12-05 20:12:19 +0000 |
commit | 80882e85b4fbd9f20d76f6e64278cb7997c2114d (patch) | |
tree | 04a065c326c12d268f2a77078296f345a370d446 | |
parent | 4e4c87a915116814f54b11992bf3742ac97aa103 (diff) | |
download | gstreamer-plugins-base-80882e85b4fbd9f20d76f6e64278cb7997c2114d.tar.gz |
audiodecoder: fix buffer leak in error code path
-rw-r--r-- | gst-libs/gst/audio/gstaudiodecoder.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gst-libs/gst/audio/gstaudiodecoder.c b/gst-libs/gst/audio/gstaudiodecoder.c index 333dbf9eb..a6779b508 100644 --- a/gst-libs/gst/audio/gstaudiodecoder.c +++ b/gst-libs/gst/audio/gstaudiodecoder.c @@ -1231,8 +1231,10 @@ gst_audio_decoder_finish_frame (GstAudioDecoder * dec, GstBuffer * buf, if (buf) { ret = check_pending_reconfigure (dec); - if (ret == GST_FLOW_FLUSHING || ret == GST_FLOW_NOT_NEGOTIATED) + if (ret == GST_FLOW_FLUSHING || ret == GST_FLOW_NOT_NEGOTIATED) { + gst_buffer_unref (buf); goto exit; + } if (priv->pending_events) send_pending_events (dec); |