From bc6b68215f1a9a83a3018fb351451701e22ec0ce Mon Sep 17 00:00:00 2001 From: Mads Buvik Sandvei Date: Thu, 8 Jul 2021 14:25:23 +0200 Subject: [PATCH] codecs: h265decoder: Always free messages while parsing SEI Part-of: --- gst-libs/gst/codecs/gsth265decoder.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gst-libs/gst/codecs/gsth265decoder.c b/gst-libs/gst/codecs/gsth265decoder.c index 884a82851e..081fe7e0af 100644 --- a/gst-libs/gst/codecs/gsth265decoder.c +++ b/gst-libs/gst/codecs/gsth265decoder.c @@ -415,7 +415,7 @@ gst_h265_decoder_parse_sei (GstH265Decoder * self, GstH265NalUnit * nalu) { GstH265DecoderPrivate *priv = self->priv; GstH265ParserResult pres; - GArray *messages; + GArray *messages = NULL; guint i; pres = gst_h265_parser_parse_sei (priv->parser, nalu, &messages); @@ -424,6 +424,7 @@ gst_h265_decoder_parse_sei (GstH265Decoder * self, GstH265NalUnit * nalu) /* XXX: Ignore error from SEI parsing, it might be malformed bitstream, * or our fault. But shouldn't be critical */ + g_clear_pointer (&messages, g_array_unref); return TRUE; }