projects
/
platform
/
upstream
/
gst-plugins-base.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c5c78a7
)
audiodecoder: Fix leak on failed audio gaps
author
Doug Nazar
<nazard@nazar.ca>
Wed, 26 Jun 2019 07:39:54 +0000
(
03:39
-0400)
committer
Tim-Philipp Müller
<tim@centricular.com>
Sat, 10 Aug 2019 10:32:19 +0000
(11:32 +0100)
If we fail to process the gap event we need to unref the event or
we end up with a leak.
gst-libs/gst/audio/gstaudiodecoder.c
patch
|
blob
|
history
diff --git
a/gst-libs/gst/audio/gstaudiodecoder.c
b/gst-libs/gst/audio/gstaudiodecoder.c
index ba6ebcceea2f38ad82622dd5ef11c2a87f2d82ae..15d8038b41f5dae7c8163c7a2c7a202dce557830 100644
(file)
--- a/
gst-libs/gst/audio/gstaudiodecoder.c
+++ b/
gst-libs/gst/audio/gstaudiodecoder.c
@@
-2225,6
+2225,7
@@
gst_audio_decoder_handle_gap (GstAudioDecoder * dec, GstEvent * event)
GST_AUDIO_DECODER_STREAM_UNLOCK (dec);
GST_ELEMENT_ERROR (dec, STREAM, FORMAT, (NULL),
("Decoder output not negotiated before GAP event."));
+ gst_event_unref (event);
return FALSE;
}
needs_reconfigure = TRUE;
@@
-2273,6
+2274,7
@@
gst_audio_decoder_handle_gap (GstAudioDecoder * dec, GstEvent * event)
ret = gst_audio_decoder_push_event (dec, event);
} else {
ret = FALSE;
+ gst_event_unref (event);
}
}
return ret;